msgbartop
MAC OS X, Linux, Windows and other IT Tips and Tricks
msgbarbottom

21 Jan 16 Create a new database and use in MySQL/MariaDB

These commands will create a new database in MySQL/MariaDB including a new user/password with full access to the DB.
mysql -p -u root
Enter the MySQL root password.
mysql> CREATE DATABASE dbname CHARACTER SET utf8 COLLATE utf8_bin;
mysql> GRANT ALL PRIVILEGES ON dbname.* TO 'user'@'localhost' IDENTIFIED BY 'password';
mysql> FLUSH PRIVILEGES;
mysql> QUIT

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: