Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newbie: Listing users 2

Status
Not open for further replies.

ribsa3

Programmer
Jun 17, 2003
56
Hi

Quite simply, I would like to list the users and their permissions on my MySQL server. Child's play, but I hope you'll help me anyway!

Kindly,

Bjoern Sandvik
 
You can do normal SELECT queries on the user, db, tables_priv, and columns_priv tables, which can show all users and their privileges.

You can also do [tt]SHOW GRANTS FOR username@hostname[/tt]
which will recreate a GRANT statement for the named user.

-----
ALTER world DROP injustice, ADD peace;
 
Hi. I just wanted to add something to the last answer, those queries must be done on the mysql database so you should do something like:

mysql> use mysql;
mysql> select user, host from user;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top