[HOW TO] view a list of MySQL users and privileges

Today, developer request for me about grant the privileges. And developers has user existing on Database.

Easy,

I only add more permission for them. To find out all MySQL users and the permissions granted to each user, log in to MySQL server, and run the following MySQL command.

To get a list of MySQL users:
mysql>select user,host from mysql.user;

To find the privileges granted to a particular MySQL account:
mysql>show grants for 'root'@'%';


Thank you for reading this article, please a comment if you are interested.

Tiến Phan - R0039

Knowledge is Endless

Sharing for Success