Mysql list privileges for a user

SHOW GRANTS;
SHOW GRANTS FOR CURRENT_USER;
SHOW GRANTS FOR CURRENT_USER();

e.g. SHOW GRANTS FOR root;

mysql> SHOW grants for root;
+———————————————————————————-+
| Grants for root@% |
+———————————————————————————-+
| GRANT ALL PRIVILEGES ON *.* TO ‘root’@’%’ IDENTIFIED BY PASSWORD ‘*81F5E21E35407D884A6CD4A731AEBFB6AF209E1B’ WITH GRANT OPTION |
+———————————————————————————-+
1 row in set (0.00 sec)

mysql>

 

nJoy 😉

 

Write a Reply or Comment

Your email address will not be published.