美文网首页
mysql access denied权限问题

mysql access denied权限问题

作者: 大道至简_6a43 | 来源:发表于2021-07-12 17:33 被阅读0次

%表示从外部服务器

localhost代表本地服务器

*.*代表所有数据库的所有表,*表示模糊匹配的意思。

第一个*即所有数据库,第二个*即任意一个数据库的所有表。

show grants for “username”@“%”;    %代表chai用户的外部连接权限

grant all privileges on *.* to 'chai'@'localhost' identified by ‘password’;

# 赋予新用户,从本地操作所有数据库.所有数据表的所有权限

grant all privileges on *.* to 'username'@'%' identified by 'password';

# 赋予新用户,从外部操作所有数据库.所有数据表的所有权限(没有外部客户端的IP限制,但本地有限制)

相关文章

网友评论

      本文标题:mysql access denied权限问题

      本文链接:https://www.haomeiwen.com/subject/kmcdpltx.html