背景:新安装的mysql8,授权了root用户可以远程登录,发现root用户无法授权。
解决方案:
- 查看mysql库中的user表
注:通过上面查看明显能看出Grant_priv: N,说明没有Grant权限。
- 解决:
执行update 方法将N改成Y即可,这里需要注意的是用户和主机一定作为条件填写正确,避免造成其他问题。
- 刷新权限并重新登录即可。
背景:新安装的mysql8,授权了root用户可以远程登录,发现root用户无法授权。
解决方案:
注:通过上面查看明显能看出Grant_priv: N,说明没有Grant权限。
执行update 方法将N改成Y即可,这里需要注意的是用户和主机一定作为条件填写正确,避免造成其他问题。