当前位置:Gxlcms >
数据库问题 >
ERROR 1130: Host '' is not allowed to connect to thisMySQL server
ERROR 1130: Host '' is not allowed to connect to thisMySQL server
时间:2021-07-01 10:21:17
帮助过:40人阅读
解决方法:
1,修改user表
mysql -u root -p
mysql>use mysql;
mysql>update user set host = ‘172.27.241.1‘ where user =‘root‘;
mysql>flush privileges;
2.指定授权
mysql -u root -p
mysql>use mysql;
mysql>GRANT ALL PRIVILEGES ON *.* TO ‘root‘@‘172.27.241.1‘ IDENTIFIED BY ‘mypassword‘ WITH GRANT OPTION;
mysql>flush privileges;
注意:
1.精准授权,即那个账号,哪台主机,需要哪种权限,必须写明,最好不要泛授权;
2.记着执行完每条命令要flush privileges;
版权声明:本文为博主原创文章,未经博主允许不得转载。
ERROR 1130: Host '' is not allowed to connect to thisMySQL server
标签:error 1130