Get MySQL user accounts
Hello friends, I am using MySQL and I want to list user accounts. So to do this I followed the below process:
This can be done by writing the following query:
SELECT User FROM mysql.user;
This query will display you the list of user accounts as seen below:
![](http://findnerd.s3.amazonaws.com/imagedata/4395/4395.png)
You can also get the lists of hosts with users by running the query:
select User,Host from mysql.user;
You will see the User and Host as shown below:
![](http://findnerd.s3.amazonaws.com/imagedata/4396/4396.png)
Thanks for reading the blog.
0 Comment(s)