GRANT ALL PRIVILEGES ON `db_name`.* TO 'user'@'host'
GRANT SELECT, UPDATE, INSERT, DELETE ON `db_name`.* TO 'user'@'localhost';
-- 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'");