MySQL MariaDB Client CLI References

Many systems run MariaDB instead of MySQL. Many of thos systems link the mysql client directly to the mariadb client but some do not. If you cannot access a MariaDB client with mysql, try mariadb instead.

Access the DB Client

mariadb -u <the-db-username> -p Login to the MariaDB client to access a database.
mysql -u <the-db-username> -p Login to the MySQL client to access a database.

MySQL or MariaDB Client

status; Show the database status and info.
show databases; Show all the databases.
use <db-Name>; Switch to using a specific database.
SELECT user FROM mysql.user; Select all the users from the database.
SELECT DISTINCT User FROM mysql.user; Select all distinct users from the database.