Get list of MySQL user accounts


Get list of MySQL user accounts : If you are looking to get the list of the user accounts in mysql you can get this simply using the query from mysql.user table. Here in this example we are going to explain how you can get all the users of the mysql using the simple query.


Get list of MySQL user accounts

Here is simple query which will give you the list of the MySql User Accounts –

Get list of MySQL user accounts:

SELECT User FROM mysql.user;

The above example will give you the mysql users. It will produce output something like this –

Get list of MySQL user accounts

More Information About MySql Users

Let us go over other detailed information from mysql.

MySql get Username, Password And Hostname

You can get the username, hostname and password from mysql simply using the query below –

MySql get Username, Password And Hostname (Hosts):

SELECT User, Password, Host FROM mysql.user;

If you the above query it will give you the username, password and hostname. The output will be something like this –

MySql get Username, Password And Hostname


Advertisements

Add Comment

📖 Read More