{"id":5284,"date":"2024-10-28T06:43:50","date_gmt":"2024-10-28T06:43:50","guid":{"rendered":"https:\/\/ubiq.co\/tech-blog\/?p=5284"},"modified":"2026-01-08T04:31:20","modified_gmt":"2026-01-08T04:31:20","slug":"how-to-list-users-in-mysql","status":"publish","type":"post","link":"https:\/\/ubiq.co\/tech-blog\/how-to-list-users-in-mysql\/","title":{"rendered":"How to List Users in MySQL"},"content":{"rendered":"\n<p>MySQL is a popular database that allows multiple users to easily build data-driven applications and perform data analysis. The number of users accessing a MySQL server keeps growing over time and it is important to keep an eye on their activities. So database administrators need to determine all the users that are able to access MySQL databases to prevent unauthorized actions. There are numerous ways to get the list of users in MySQL. In this article, we will learn how to do this.<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-list-users-in-mysql\/#How_to_List_Users_in_MySQL\" >How to List Users in MySQL<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-list-users-in-mysql\/#1_List_All_User_Accounts\" >1. List All User Accounts<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-list-users-in-mysql\/#2_List_Users_Hosts\" >2. List Users &amp; Hosts<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-list-users-in-mysql\/#3_List_User_Host_Password\" >3. List User, Host &amp; Password<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-list-users-in-mysql\/#4_Users_with_Locked_Accounts\" >4. Users with Locked Accounts<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-list-users-in-mysql\/#5_List_Accounts_with_Expired_Password\" >5. List Accounts with Expired Password<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-list-users-in-mysql\/#6_List_Logged_in_Users\" >6. List Logged in Users<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-list-users-in-mysql\/#7_Logged_In_Users_with_Commands\" >7. Logged In Users with Commands<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-list-users-in-mysql\/#Conclusion\" >Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_to_List_Users_in_MySQL\"><\/span>How to List Users in MySQL<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Here are the different ways to list MySQL users. You will need to have admin privileges to be able to run most or all of these queries. Regular users will not be able to run them.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"1_List_All_User_Accounts\"><\/span>1. List All User Accounts<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Every MySQL server creates a bunch of system databases &amp; tables at the time of installation. They are updated as the data and users on your server evolve over time. All MySQL user accounts on your server are present in one such table mysql.users table. It contains information about all MySQL users, their IP address, encrypted password, etc. including <a href=\"https:\/\/ubiq.co\/tech-blog\/create-read-only-mysql-user\/\">read only users<\/a>. You can check its columns by logging into MySQL and using the following query.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql&gt; desc mysql.user<\/pre>\n\n\n\n<p>You get a list of all MySQL usernames using the following query.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql&gt; select distinct user from mysql.users<\/pre>\n\n\n\n<p>You will see an output like the following.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">+-------+<br>| User  |<br>+-------+<br>| root  |<br>+-------+<br>| user1 |<br>+-------+<\/pre>\n\n\n\n<p>Please note, in MySQL.users table, there are multiple rows of information for each user. It will also include information about users with <a href=\"https:\/\/ubiq.co\/tech-blog\/enable-remote-access-mysql\/\">remote access<\/a>. Therefore, we need to use distinct keyword while selecting usernames.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"2_List_Users_Hosts\"><\/span>2. List Users &amp; Hosts<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Sometimes, you may have multiple users with the same username but different host name or IP address. In this case, you can also select host column along with username, in the above query.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql&gt; select user, host from mysql.user;<\/pre>\n\n\n\n<p>You will see the following output which displays usernames and hosts.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">+-----------+-------------+<br>| user      | host        |<br>+-----------+-------------+<br>| root      | localhost   |<br>| user1     | localhost   |<br>| user1     | 54.43.32.21 |<br>+-----------+-------------+<\/pre>\n\n\n\n<p>You will see that user1 is listed twice &#8211; with host as localhost and as 54.43.32.21. This means that user1 can access your database from localhost or from IP 54.43.32.21 and not from anywhere else.<\/p>\n\n\n\n<p>This is a good way to determine all remote users as well as local users. Here is the query to get a list of all local users.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql&gt; select user, host from mysql.user <br>       where host='localhost' or host='127.0.0.1';<\/pre>\n\n\n\n<p>You will see the following output listing all local users.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">+-----------+-------------+<br>| user      | host        |<br>+-----------+-------------+<br>| root      | localhost   |<br>| user1     | localhost   |<br>+-----------+-------------+<\/pre>\n\n\n\n<p>Here is the query to get all remote users.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql&gt; select user, host from mysql.user <br>       where host&lt;&gt;'localhost' and host&lt;&gt;'127.0.0.1';<\/pre>\n\n\n\n<p>Here is the output containing all remote users.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">+-----------+-------------+<br>| user      | host        |<br>+-----------+-------------+<br>| user1     | 54.43.32.21 |<br>+-----------+-------------+<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"3_List_User_Host_Password\"><\/span>3. List User, Host &amp; Password<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>You can also view a list of users along with their encrypted passwords.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql&gt; select user, host, password from mysql.user<\/pre>\n\n\n\n<p>You will see the following kind of output. We have hidden password characters using &#8216;&#8230;&#8217; but it will be an alphanumeric string.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">+-----------+-----------+-------------------------------------------+<br>| user      | host      | password                                  |<br>+-----------+-----------+-------------------------------------------+<br>| root      | localhost | *4ACFE...029441                           |<br>| user1     | localhost | *EECD8...2D9AAA                           |<br>+-----------+-----------+-------------------------------------------+<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"4_Users_with_Locked_Accounts\"><\/span>4. Users with Locked Accounts<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>If you have locked some MySQL users then you may want to check up on them from time to time, to ensure they remain so. Here is the query to check if an account is locked or not. Starting MySQL 5.7.6, mysql.user table contains a column <a href=\"https:\/\/dev.mysql.com\/doc\/refman\/8.4\/en\/account-locking.html\" target=\"_blank\" rel=\"noreferrer noopener\">account_locked<\/a>. It contains Y for locked accounts and N for accounts that are not locked.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql&gt; select user, account_locked from mysql.user;<\/pre>\n\n\n\n<p>You will see the following output.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">+-----------+-----------------+<br>| user      | account_locked  |<br>+-----------+-----------------+<br>| root      | N               |<br>| user1     | Y               |<br>+-----------+-----------------+<\/pre>\n\n\n\n<p>Please note, this feature is available only on MySQL &gt;=5.7.6. Older systems will need to upgrade to this version for this feature.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"5_List_Accounts_with_Expired_Password\"><\/span>5. List Accounts with Expired Password<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>When a user&#8217;s password has expired, they are unable to log into their MySQL account. So database administrators will need to check if that is the case, before taking any action. You can do this using the following query.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql&gt; select user, password_expired from mysql.user;<\/pre>\n\n\n\n<p>You will see the following output which contains the value of password_expired column for each username. It is Y if password expired and N if it is not expired.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">+-----------+-------------------+<br>| user      | password_expired  |<br>+-----------+-------------------+<br>| root      | N                 |<br>| user1     | Y                 |<br>+-----------+-------------------+<\/pre>\n\n\n\n<p>If you want to check whether a specific account&#8217;s password is expired or not, then you can use a WHERE clause for this purpose.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql&gt; select user, password_expired from mysql.user<br>       where user=<strong>&lt;username&gt;<\/strong>;<\/pre>\n\n\n\n<p>Please note, this is not available in older MySQL versions.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"6_List_Logged_in_Users\"><\/span>6. List Logged in Users<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>So far all the above queries are about the user accounts that are present on your MySQL server, whether they are logged in or not, whether they are locked or not. <\/p>\n\n\n\n<p>What if you want to get a list of users that are presently logged into your server? For this purpose, you can use the following SQL query.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql&gt; select user();<\/pre>\n\n\n\n<p>You will see the following list of logged in users, with their usernames and host.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">+-----------------+<br>| user()          |<br>+-----------------+<br>| user1@localhost |<br>+-----------------+<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"7_Logged_In_Users_with_Commands\"><\/span>7. Logged In Users with Commands<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>If you also want to view the different commands executed by users, you can get this information from information_schema.processlist table. <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql&gt; select user, host, db, command from information_schema.processlist;<\/pre>\n\n\n\n<p>You will see an output as the following.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">+------+-----------------+------+---------+<br>| user | host            | db   | command |<br>+------+-----------------+------+---------+<br>| root | localhost:49790 | NULL | Query   |<br>+------+-----------------+------+---------+<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>In this article, we have learnt several easy ways to quickly get a list of users in MySQL. Database administrators can use them to understand who all are presently accessing their database server. Each of these commands works for a different use case. Depending on your requirement, you can use any of them. You can run these queries from MySQL command line client or GUI tools such as Workbench and HeidiSQL. Just make sure that the admin user credentials you use, actually has the permission to run these queries.<\/p>\n\n\n\n<p>Also read:<\/p>\n\n\n\n<p><a href=\"https:\/\/ubiq.co\/tech-blog\/how-to-get-character-set-of-mysql-database-or-table-or-column\/\">How to Get Character Set of MySQL Database<\/a><br><a href=\"https:\/\/ubiq.co\/tech-blog\/how-to-remove-item-from-array-in-javascript\/\">How to Remove Item from JavaScript Array<\/a><br><a href=\"https:\/\/ubiq.co\/tech-blog\/how-to-check-if-file-exists-in-python\/\">How to Check if File Exists in Python<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Database administrators need to determine the users in MySQL server. Here is how to list users in MySQL.<\/p>\n","protected":false},"author":1,"featured_media":5303,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[324],"tags":[327],"class_list":["post-5284","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mysql","tag-list-users"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to List Users in MySQL - Ubiq BI<\/title>\n<meta name=\"description\" content=\"Database administrators need to determine the users in MySQL server. Here is how to list users in MySQL to manage account access.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-list-users-in-mysql\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to List Users in MySQL - Ubiq BI\" \/>\n<meta property=\"og:description\" content=\"Database administrators need to determine the users in MySQL server. Here is how to list users in MySQL to manage account access.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ubiq.co\/tech-blog\/how-to-list-users-in-mysql\/\" \/>\n<meta property=\"og:site_name\" content=\"Ubiq BI\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/ubiqbi\" \/>\n<meta property=\"article:published_time\" content=\"2024-10-28T06:43:50+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-01-08T04:31:20+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/ubiq.co\/tech-blog\/wp-content\/uploads\/2024\/10\/mysql-list-users.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"301\" \/>\n\t<meta property=\"og:image:height\" content=\"201\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Sreeram Sreenivasan\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@UbiqBI\" \/>\n<meta name=\"twitter:site\" content=\"@UbiqBI\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sreeram Sreenivasan\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-list-users-in-mysql\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-list-users-in-mysql\\\/\"},\"author\":{\"name\":\"Sreeram Sreenivasan\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/#\\\/schema\\\/person\\\/db98d49a766a3a111d8510935ab90abc\"},\"headline\":\"How to List Users in MySQL\",\"datePublished\":\"2024-10-28T06:43:50+00:00\",\"dateModified\":\"2026-01-08T04:31:20+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-list-users-in-mysql\\\/\"},\"wordCount\":872,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-list-users-in-mysql\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/ubiq.co\\\/tech-blog\\\/wp-content\\\/uploads\\\/2024\\\/10\\\/mysql-list-users.jpg?fit=301%2C201&ssl=1\",\"keywords\":[\"list users\"],\"articleSection\":[\"MySQL\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-list-users-in-mysql\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-list-users-in-mysql\\\/\",\"url\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-list-users-in-mysql\\\/\",\"name\":\"How to List Users in MySQL - Ubiq BI\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-list-users-in-mysql\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-list-users-in-mysql\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/ubiq.co\\\/tech-blog\\\/wp-content\\\/uploads\\\/2024\\\/10\\\/mysql-list-users.jpg?fit=301%2C201&ssl=1\",\"datePublished\":\"2024-10-28T06:43:50+00:00\",\"dateModified\":\"2026-01-08T04:31:20+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/#\\\/schema\\\/person\\\/db98d49a766a3a111d8510935ab90abc\"},\"description\":\"Database administrators need to determine the users in MySQL server. Here is how to list users in MySQL to manage account access.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-list-users-in-mysql\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-list-users-in-mysql\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-list-users-in-mysql\\\/#primaryimage\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/ubiq.co\\\/tech-blog\\\/wp-content\\\/uploads\\\/2024\\\/10\\\/mysql-list-users.jpg?fit=301%2C201&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/ubiq.co\\\/tech-blog\\\/wp-content\\\/uploads\\\/2024\\\/10\\\/mysql-list-users.jpg?fit=301%2C201&ssl=1\",\"width\":301,\"height\":201,\"caption\":\"list users in mysql\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-list-users-in-mysql\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to List Users in MySQL\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/#website\",\"url\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/\",\"name\":\"Ubiq BI\",\"description\":\"Build dashboards &amp; reports in minutes\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/#\\\/schema\\\/person\\\/db98d49a766a3a111d8510935ab90abc\",\"name\":\"Sreeram Sreenivasan\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g\",\"caption\":\"Sreeram Sreenivasan\"},\"description\":\"Sreeram Sreenivasan is the Founder of Ubiq. He has helped many Fortune 500 companies in the areas of BI &amp; software development.\",\"sameAs\":[\"https:\\\/\\\/www.linkedin.com\\\/in\\\/sreeram-sreenivasan\\\/\"],\"url\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/author\\\/wordpress\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to List Users in MySQL - Ubiq BI","description":"Database administrators need to determine the users in MySQL server. Here is how to list users in MySQL to manage account access.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/ubiq.co\/tech-blog\/how-to-list-users-in-mysql\/","og_locale":"en_US","og_type":"article","og_title":"How to List Users in MySQL - Ubiq BI","og_description":"Database administrators need to determine the users in MySQL server. Here is how to list users in MySQL to manage account access.","og_url":"https:\/\/ubiq.co\/tech-blog\/how-to-list-users-in-mysql\/","og_site_name":"Ubiq BI","article_publisher":"https:\/\/www.facebook.com\/ubiqbi","article_published_time":"2024-10-28T06:43:50+00:00","article_modified_time":"2026-01-08T04:31:20+00:00","og_image":[{"width":301,"height":201,"url":"https:\/\/ubiq.co\/tech-blog\/wp-content\/uploads\/2024\/10\/mysql-list-users.jpg","type":"image\/jpeg"}],"author":"Sreeram Sreenivasan","twitter_card":"summary_large_image","twitter_creator":"@UbiqBI","twitter_site":"@UbiqBI","twitter_misc":{"Written by":"Sreeram Sreenivasan","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/ubiq.co\/tech-blog\/how-to-list-users-in-mysql\/#article","isPartOf":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-list-users-in-mysql\/"},"author":{"name":"Sreeram Sreenivasan","@id":"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc"},"headline":"How to List Users in MySQL","datePublished":"2024-10-28T06:43:50+00:00","dateModified":"2026-01-08T04:31:20+00:00","mainEntityOfPage":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-list-users-in-mysql\/"},"wordCount":872,"commentCount":0,"image":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-list-users-in-mysql\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2024\/10\/mysql-list-users.jpg?fit=301%2C201&ssl=1","keywords":["list users"],"articleSection":["MySQL"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/ubiq.co\/tech-blog\/how-to-list-users-in-mysql\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/ubiq.co\/tech-blog\/how-to-list-users-in-mysql\/","url":"https:\/\/ubiq.co\/tech-blog\/how-to-list-users-in-mysql\/","name":"How to List Users in MySQL - Ubiq BI","isPartOf":{"@id":"https:\/\/ubiq.co\/tech-blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-list-users-in-mysql\/#primaryimage"},"image":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-list-users-in-mysql\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2024\/10\/mysql-list-users.jpg?fit=301%2C201&ssl=1","datePublished":"2024-10-28T06:43:50+00:00","dateModified":"2026-01-08T04:31:20+00:00","author":{"@id":"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc"},"description":"Database administrators need to determine the users in MySQL server. Here is how to list users in MySQL to manage account access.","breadcrumb":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-list-users-in-mysql\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ubiq.co\/tech-blog\/how-to-list-users-in-mysql\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ubiq.co\/tech-blog\/how-to-list-users-in-mysql\/#primaryimage","url":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2024\/10\/mysql-list-users.jpg?fit=301%2C201&ssl=1","contentUrl":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2024\/10\/mysql-list-users.jpg?fit=301%2C201&ssl=1","width":301,"height":201,"caption":"list users in mysql"},{"@type":"BreadcrumbList","@id":"https:\/\/ubiq.co\/tech-blog\/how-to-list-users-in-mysql\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/ubiq.co\/tech-blog\/"},{"@type":"ListItem","position":2,"name":"How to List Users in MySQL"}]},{"@type":"WebSite","@id":"https:\/\/ubiq.co\/tech-blog\/#website","url":"https:\/\/ubiq.co\/tech-blog\/","name":"Ubiq BI","description":"Build dashboards &amp; reports in minutes","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ubiq.co\/tech-blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc","name":"Sreeram Sreenivasan","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g","caption":"Sreeram Sreenivasan"},"description":"Sreeram Sreenivasan is the Founder of Ubiq. He has helped many Fortune 500 companies in the areas of BI &amp; software development.","sameAs":["https:\/\/www.linkedin.com\/in\/sreeram-sreenivasan\/"],"url":"https:\/\/ubiq.co\/tech-blog\/author\/wordpress\/"}]}},"jetpack_featured_media_url":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2024\/10\/mysql-list-users.jpg?fit=301%2C201&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/pbGGTT-1ne","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts\/5284","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/comments?post=5284"}],"version-history":[{"count":22,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts\/5284\/revisions"}],"predecessor-version":[{"id":10255,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts\/5284\/revisions\/10255"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/media\/5303"}],"wp:attachment":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/media?parent=5284"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/categories?post=5284"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/tags?post=5284"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}