MySql Show Grants
show grants for unrestricted user
show grants for a user with all (%) host accessmysql> show grants for myuser; +---------------------------------------------------------------------------------------------+ | Grants for myuser@% | +---------------------------------------------------------------------------------------------+ | GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'%' IDENTIFIED BY PASSWORD 'XXXX' WITH GRANT OPTION | +---------------------------------------------------------------------------------------------+
show grants for restricted user
show grants for a user with host access restricted to specific hosts or subnetsmysql> show grants for 'myuser'@'mydomain'; +--------------------------------------------------------------------------------+ | Grants for 'myuser'@'mydomain' | +--------------------------------------------------------------------------------+ | GRANT USAGE ON *.* TO 'myuser'@'mydomain' IDENTIFIED BY PASSWORD 'XXXX' | | GRANT SELECT, CREATE TEMPORARY TABLES ON `mydb0`.* TO 'myuser'@'mydomain' | | GRANT ALL PRIVILEGES ON `mydb1`.* TO 'myuser'@'mydomain' WITH GRANT OPTION | | GRANT ALL PRIVILEGES ON `mydb2`.* TO 'myuser'@'mydomain' WITH GRANT OPTION | +--------------------------------------------------------------------------------+
REFERRERS
MySqlShow