当前位置:Gxlcms > 数据库问题 > 解决MySQL8 #1227 – Access denied; you need (at least one of) the SYSTEM_USER privilege(s) for this ...

解决MySQL8 #1227 – Access denied; you need (at least one of) the SYSTEM_USER privilege(s) for this ...

时间:2021-07-01 10:21:17 帮助过:32人阅读

因为此时用户test还没有被授权。当用户test被授权后,再使用root对test修改密码:

grant all on *.*  to ‘test‘@‘localhost‘;

set password for ‘test‘@‘localhost‘ = ‘test1‘;

这个时候系统会报错:

1> 1227 - Access denied; you need (at least one of) the SYSTEM_USER privilege(s) for this operation

我查阅了一下官方文档,原因是由于root用户没有SYSTEM_USER权限,把权限加入后即可解决:

grant system_user on *.* to ‘root‘;

然后再修改test密码即可。不因为SYSTEM_USER权限涉及到所有帐户操作,所以不仅是修改密码,修改帐户信息,授权等都会报这个错,解决方法同样是上面的操作。

参考

https://mysqlserverteam.com/the-system_user-dynamic-privilege/

https://zhuanlan.zhihu.com/p/66866225

https://www.uedbox.com/post/64673/



作者:HanssonLiu
链接:https://www.jianshu.com/p/1b565749bdab
来源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。

解决MySQL8 #1227 – Access denied; you need (at least one of) the SYSTEM_USER privilege(s) for this ...

标签:dynamic   解决方法   har   word   ant   key   tag   link   blank   

人气教程排行