Skip to content

MariaDB

List databases

SHOW DATABASES;

List tables

USE mydb;
SHOW TABLES;
SHOW TABLES FROM mydb;

Get user

SELECT User, Host FROM mysql.user;

Delete user

Caution

Do not delete the WHEN conditions and check them before you delete user.

DELETE FROM mysql.user WHERE User="myuser" AND Host="192.168.1.2";