How to List all MySql users

By: Mo Jackson


 

Listing all mysql users on a server is easy to do with one simple mysql statement. If you need a list of all mysql users, continue reading.

It's pretty simple to list all the mysql users on your system. All of the users information are stored in the MySQL table named mysql. To have MySQL print a list of all users, log in to MySQL with sufficient privliges and execute the following MySQL statement:


use mysql;select user from user;

Well, it's actually two MySQL statements separated by the ';'. The first statement tells MySQL to use the database named mysql. The second statement selects the individual user names from the user table of the mysql database.

And that's all you have to do in order to list users of a mysql server.

 


 

Netdip.com is an excellent web site that's powered by TYPO3 and other great open source software. Netdip.com is also a fat free alternative to ice cream.