How to List the Users in MariaDB?
For listing the users in MariaDB, you just have to perform the following simple steps:
Step # 1: Log Into the MariaDB Console
First, you need to log into the MariaDB console by running the command shown below:
The MariaDB console is shown in the following image:
Step # 2: List All the Users of MariaDB
To list the users that you have created so far in MariaDB, you just need to run the command shown below:
This command will display all the users that you have created in MariaDB. In our case, we only had one user, i.e., the root user, which is shown in the following image:
Step # 3: List Other Information Along With the Users of MariaDB (Optional)
This step is optional; however, if you wish to display other information along with the users in MariaDB, such as hostnames, etc., then you just need to run the command shown below:
The user names, along with their respective hostnames, will appear on the console after the execution of this command, as shown in the following image. In the same manner, if you wish to display the passwords associated with each user of MariaDB, then you can also mention the “password” keyword in the above-mentioned command.
By following this article, you can easily list down all the users present in your MariaDB server. No matter how many users you have created within your database server, you will easily be able to list them all down by making use of the prescribed method.