Login in mysql command
Create database command
Grant privilege
mysql -u root -p
Create database command
CREATE DATABASE m2;
Grant privilege
GRANT ALL PRIVILEGES ON m2.* TO 'root'@'localhost';