Display list of MySQL User Accounts


Problem

I want to see all Users with the command line tool.



Solution

pretty simple, login is as root and use

SELECT DISTINCT User FROM mysql.user;

this will output something like

User
root
user1
user2

Comments


Remo

9 months ago

This table contains more options showing you whether the account is active, what permissions it has an so on. Just try with a *:

SELECT * FROM mysql.user

Leave a Comment





Please sign-in to post a comment