ユーザ情報を確認するには以下の構文を使用します。
mysql> SELECT user, host FROM mysql.user; +--------+-----------+ | user | host | +--------+-----------+ | root | 127.0.0.1 | | admin | localhost | | root | localhost | | user | localhost | | user2 | localhost | +--------+-----------+ 5 rows in set (0.00 sec)
権限を確認する
SHOW GRANTS FOR ユーザ名;
mysql> SHOW GRANTS FOR admin@localhost; +------------------------------------------------------------------------------------------------------------------------------------------+ | Grants for admin1@localhost | +------------------------------------------------------------------------------------------------------------------------------------------+ | GRANT ALL PRIVILEGES ON *.* TO 'admin'@'localhost' IDENTIFIED BY PASSWORD '*xxxxxxxxxx' WITH GRANT OPTION | +------------------------------------------------------------------------------------------------------------------------------------------+ 1 row in set (0.00 sec)