13.7.5.17SHOW GRANTS Syntax
SHOW GRANTS [FOR user] thisstatementdisplaysthegrantstatementorstatementorstatementsthatmustbeissuedtoduplicatetheprivilegestharantedtoamysqluseraccount . ectprivilegeforthemysqldatabase,excepttoseetheprivilegesforthecurrentuser。
To name the account,usethesameformatasforthegrantstatement; for example,' Jeffrey ' @ ' localhost '.ifyouspecifyonlytheusernamepartoftheaccountname,ahostnamepartof ' % ' is used.Ford
MySQL 3358 www.Sina.com-------------------- MySQL 3358 www.Sina.com gantsforroot @ localhostlsdgk-------------gantsforroot @ localhostlsdgk ----------------------------------- - hgrantoptionlsdgk------------ hgrantoptionlsdgk totheaccountthatyouareusingtoconnecttotheserver,youcanuseanyofthefollowingstatements 3360
SHOW GRANTS; SHOW GRANTS FOR CURRENT_USER; SHOW GRANTS FOR CURRENT_USER (; As of MySQL 5.0.24,ifshowgrantsforcurrent _ user (oranyoftheequivalentsyntaxes ) is used inDEFINERcontext, suchaswithinastoredprocedurethatisdefinedwithsqlsecuritydefiner )、thegrantsdisplayedarethoseofthedefinerandnotttheinvoker。
showgrantsdisplaysonlytheprivilegesgrantedexplicitlytothenamedaccount.otherprivilegesthatmightbeavailabletotheacountarenotdotd eaccountarenotdot yed.for example,if an anonymous account exists,thenamedaccountmightbeabletouseitsprivileges,butshowgrantswrantswts
3359 docs.Oracle.com/CD/e 17952 _ 01/MySQL-5.0-en/show-grants.html