FreeKB - mySQL / MariaDB display a users privileges using SHOW GRANTS statement
mySQL / MariaDB - display a users privileges using SHOW GRANTS statement

This assume you are able to log into your MariaDB or mySQL server or you have configured passwordless authentication and will be using the -e command line option. The SHOW GRANTS statement can be used to display every users grants.

mysql> show grants;

 

Something like this should be displayed.

[root@http1 ~]# mysql -e "show grants"
+----------------------------------------------------------------------------------------------------------------------------------------+
| Grants for root@localhost                                                                                                              |
+----------------------------------------------------------------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY PASSWORD '*B87A204DF7CFA2D10278BBA8AC90DC081CD15EB2' WITH GRANT OPTION |
| GRANT PROXY ON ''@'' TO 'root'@'localhost' WITH GRANT OPTION                                                                           |
+----------------------------------------------------------------------------------------------------------------------------------------+

 



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




Please enter 2acd4 in the box below so that we can be sure you are a human.




Comments

Web design by yours truely - me, myself, and I   |   jeremy.canfield@freekb.net   |