MariaDB [none]> use mysql
MariaDB [none]> CREATE DATABASE test1;
MariaDB [none]> SHOW CREATE DATABASE test1;
MariaDB [test1]> SELECT default_character_set_name FROM information_schema.SCHEMATA S WHERE schema_name = "test1";
MariaDB [test1]> ALTER DATABASE test1 CHARACTER SET utf8 COLLATE utf8_unicode_ci;
mysqldump -u root -R oldDbName > oldDbName.sql
.sql
file to DBmysql -u root newDbName < inputFile.sql
MariaDB [mysql]> select User, Host, Password from user;
This says SELECT [these column(s)] FROM [this table]
Removing data from a table
MariaDB [test1]> DELETE FROM table_name WHERE condition_here;
MariaDB [test1]> DELETE FROM employees WHERE id < 200;
CREATE USER 'ross'@'localhost' IDENTIFIED BY '**************';
DROP USER 'ross'@'localhost';
Grant all db privileges to user
GRANT ALL ON test1.* to 'ross'@'%';
Show grants
SHOW GRANTS FOR ross;