you need (at least one of) the RELOAD privilege(s) for this operation
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了you need (at least one of) the RELOAD privilege(s) for this operation相关的知识,希望对你有一定的参考价值。
问题:
新搭建的mysql5.6.20,默认没有密码直接输入mysql回车进行登录:
mysql
将root@localhost改为root@%
update mysql.user set host=% where user=root and host=localhost;
退出重新登录:
mysql -uroot -p123456
会直接报错账号密码错误,这时候直接输入mysql回车还可以登录
再执行:
select user,host from mysql.user;
直接报错:
Access denied; you need (at least one of) the RELOAD privilege(s) for this operation
解决办法:
因为root@localhost 改为root@%
可以使用mysql -uroot -p123456 -h 192.168.10.130登录
然后重新创建root@localhost账号
grant all on *.* to root@localhost identified by 123456 with grant option;
flush privileges;
这样子既可以远程登录root也可以本机直接登录
猜想:
将root@localhost 改为root@%,host里面没有做业务ip和主机名之间的映射
以上是关于you need (at least one of) the RELOAD privilege(s) for this operation的主要内容,如果未能解决你的问题,请参考以下文章
Access denied; you need (at least one of) the SYSTEM_USER privilege(s) for this operation
使用Mysql Workbench 导入数据库提示 ERROR 1227 (42000) at line 18: Access denied; you need (at least one of) t
解决MySQL8 #1227 – Access denied; you need (at least one of) the SYSTEM_USER privilege(s) for this ...
编译mcrypt时,报错:You need at least libmhash 0.8.15
Error "At least one file is needed for database attach" for DB attach
phpmailer报 You must provide at least one recipient email address.解决办法