mysql see user permissions code example
Example 1: mysql check user privileges
SHOW GRANTS FOR 'root'@'localhost';
Example 2: mysql user permission database
GRANT ALL PRIVILEGES ON `db_name`.* TO 'user'@'host'
SHOW GRANTS FOR 'root'@'localhost';
GRANT ALL PRIVILEGES ON `db_name`.* TO 'user'@'host'