How-To Create A MySQL Database And Set Privileges To A User

 

mysql> create database ajay;
Query OK, 1 row affected (0.00 sec)

CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';

GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';

FLUSH PRIVILEGES;