Creating mysql database and granting user access
$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 3.22.32
Type ‘help’ for help.
mysql>
mysql> create database dbname;
Query OK, 1 row affected (0.00 sec)
mysql>show databases;
mysql> GRANT ALL ON dbname.* TO username@localhost IDENTIFIED BY “password”;
Query OK, 0 rows affected (0.00 sec)
Advertisement
Leave a Comment