You can see a list of MySQL/MariaDB user accounts by using the mysql
client and querying the mysql.user
table. The mysql.user
table contains information about the user accounts, including the username, host, and authentication information.
Here’s how you can get a list of MySQL/MariaDB user accounts:
- Log in to the MySQL/MariaDB client:
mysql -u root -p
- Select the
mysql
database:use mysql;
- Run the following query to get a list of user accounts:
SELECT User, Host FROM user;
This will produce a list of the usernames and hostnames of all MySQL/MariaDB user accounts.
Note: Make sure to replace the root
username with the appropriate MySQL/MariaDB username, and to enter the password when prompted.