首页 > 编程知识 正文

查看当前数据库用户权限,mysql查看账号权限

时间:2023-05-06 16:16:15 阅读:179572 作者:152

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

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。