MYSQL8给新用户grant权限报错的解决方法.241202
MYSQL8用客户端创建用户,无法grant,报错:Access denied for user ‘root‘@‘xxx.xxx.xxx.xxx‘ (using password: YES) 。
解决方法:
误区:不要相信网上各种传说,比如update root账号,没用。
update mysql.user set Grant_priv='N',Super_priv='Y' where user = 'root' and host = 'xx.xx';
最正确的办法:
到服务器,本地登录 root@localhost账号,然后,grant权限,即可。
grant select on *.* to 'onlyread'@'%';
喜欢请赞赏一下啦^_^赞赏后请加wx:weyocul,相关文章提到的的安装包稍后给到哦!没有收到赞赏直接加我的,直接无视哈!

浙公网安备 33010602011771号