mysql grant all privileges to user on database code example
Example 1: mysql grant all privileges to a user
GRANT ALL PRIVILEGES ON database_name.* TO 'username'@'localhost';
Example 2: grant all privileges mysql
Syntax:
GRANT ALL PRIVILEGES ON database_name.* TO 'username'@'localhost';
Example 3: grant revoke privileges to mysql username
GRANT ALL PRIVILEGES ON * . * TO 'username'@'localhost';
FLUSH PRIVILEGES;
SHOW GRANTS FOR 'username'@'localhost';
REVOKE type_of_permission ON database_name.table_name FROM 'username'@'localhost';