9951 explained code solutions for 126 technologies


mariadbHow to list users in Mariadb?


To list users in MariaDB, you can use the SELECT statement with the USER table.

SELECT User, Host FROM mysql.user;

This will output a list of users and their associated hosts.

Code explanation

  1. SELECT - This is a SQL statement used to select data from a database.
  2. USER - This is the table in the mysql database that contains user information.
  3. User, Host - These are the columns from the USER table that will be selected.

Helpful links

Edit this code on GitHub