GRANT ALL PRIVILEGES ON database_name.* TO 'username'@'localhost';
GRANT ALL PRIVILEGES ON `db_name`.* TO 'user'@'host'
-- create user if not exists
-- CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';");
-- grant all user permissions on all database and tables
-- GRANT ALL ON *.* TO 'username'@'localhost'");
-- create specific database
-- CREATE DATABASE newdatabase
-- grant all user permissions on db 'newdatabase' and all tables
-- GRANT ALL ON newdatabase.* TO 'username'@'localhost'");
-- grant all user permissions on db 'newdatabase' and table 'newtable'
-- GRANT ALL ON newdatabase.newtable TO 'username'@'localhost'");