Recommended Free Tools
To list accounts on a MySQL or MariaDB server, connect to that server and run SELECT User, Host FROM mysql.user ORDER BY User, Host;. Keep both columns: the username and host together identify an account, so the same username may appear as multiple distinct accounts.
List accounts on the server
Run this query in a SQL client connected to the MySQL or MariaDB instance you want to inspect:
SELECT User, Host
FROM mysql.user
ORDER BY User, Host;
MariaDB’s developer cheat sheet documents SELECT user,host FROM mysql.user; for listing users on an instance. The MariaDB mysql.user reference describes the account metadata. Your results show accounts visible to your connected database account.
Filter for one username
To see the host entries associated with a particular username, substitute the name you want to check:
#1 Best Overall
SELECT User, Host
FROM mysql.user
WHERE User = 'app_user'
ORDER BY Host;
Count account rows
This returns the number of account rows, not the number of distinct usernames:
SELECT COUNT(*) AS account_count
FROM mysql.user;
Why both User and Host matter
MySQL and MariaDB accounts are host-qualified. For example, 'alice'@'localhost' and 'alice'@'%' are separate account identities. The User and Host values together identify the account, so a query that displays only User can conceal meaningful differences. MariaDB explains this in its mysql.user table documentation and account-management documentation.
Rank #2
Check an account’s privileges
To see the privileges for a specific account, include its exact username and host:
SHOW GRANTS FOR 'app_user'@'localhost';
SHOW GRANTS returns the GRANT statements that describe the account’s privileges. See the MariaDB SHOW GRANTS reference or the MySQL SHOW GRANTS reference.
To inspect the connected account instead, run any of these forms:
SHOW GRANTS;
SHOW GRANTS FOR CURRENT_USER;
SHOW GRANTS FOR CURRENT_USER();
On MySQL, inspecting a different account may require SELECT permission on the mysql system schema; the current account is an exception. Check the MySQL documentation if the command is denied.
Get global privileges in columns
For a tabular view of global privileges, query MariaDB’s Information Schema:
SELECT GRANTEE, PRIVILEGE_TYPE, IS_GRANTABLE
FROM INFORMATION_SCHEMA.USER_PRIVILEGES
ORDER BY GRANTEE, PRIVILEGE_TYPE;
MariaDB’s USER_PRIVILEGES reference describes this table as global privilege information for user accounts and documents these columns. Use SHOW GRANTS when you need the grant statements for a particular account or role; this query is a global-privilege view.
Best Value
Account-table differences and roles
In current MariaDB, mysql.user is a compatibility view over mysql.global_priv. MariaDB directs new tooling toward Information Schema tables; the mysql.user documentation describes the compatibility view. MySQL’s privilege-table implementation can differ by release, so avoid assuming system-table internals are identical across products and versions.
Use account-management statements such as CREATE USER, ALTER USER, GRANT and REVOKE to administer accounts and privileges rather than editing system metadata directly. When reviewing MariaDB account metadata, distinguish role rows if the is_role field is available. Roles can also be inspected with SHOW GRANTS.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

