20
Jul
How to list of MySQL/MariaDB users accounts
Comments
Login to mysql
$ mysql -u root -p
Show users
mysql> SELECT User FROM mysql.user;
Show users along with host name where they are allowed to login
mysql> SELECT host, user FROM mysql.user;
OR
mysql> SELECT CONCAT(QUOTE(user),'@',QUOTE(host)) UserAccount FROM mysql.user;
ORmysql> SELECT host, user, password FROM mysql.user;
Finding out user rights
mysql> SELECT User, Db, Host from mysql.db;