ERROR 1130: Host '' is not allowed to connect to thisMySQL server

今天1网友求助,说自己PHPmyadmin可以正常连接数据库,使用sqlyog报错:

ERROR 1130: Host ‘172.27.214.1‘ is not allowed to connect to thisMySQL server

root case:MySQL默认所有帐号不允许从远程登陆,只能在localhost

解决方法:

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

时间: 2024-10-09 17:09:33

ERROR 1130: Host '' is not allowed to connect to thisMySQL server的相关文章

ERROR 1130: Host ’...′ is not allowed to connect to this MySQL server

/******************************************************************** * ERROR 1130: Host ’...′ is not allowed to connect to this MySQL server * 说明: * 使用远程登录mysql,结果无法登录,记录一下解决方法. * * 2016-9-22 深圳 南山平山村 曾剑锋 ********************************************

MYSQL ERROR 1130: Host is not allowed to connect to this MySQL server

今天安装MYSQL遇到MYSQL ERROR 1130: Host is not allowed to connect to this MySQL server, 试了很多办法都不行 skip-grant-tables 放在my.ini [mysqld] 1.更改任意主机登陆 mysql> use mysql; mysql> update user set host = '%' where user = 'root' and host='localhost'; 2.更新权限 mysql>

解决ERROR 1130: Host '*.*.*.*' is not allowed to connect to this MySQL server 方法

简单点将阿里云ecs服务器内安装的mysql数据库里面的user表里面的Host为localhost的数据 将localhost改为% 如下图 上面那种方法 非常简单是我安装了phpmyadmin的方法 也可以用命令行 #用命令访问mysqlmysql -u root -p #使用mysql数据库use mysql; #查询当前用户情况,显示有2条记录,127.0.0.1:localhost:select host, user from user; #把localhost这条记录的host改为

mysql error:Host is not allowed to connect to this MySql server

访问虚拟机中Mysql时出现如下错误: 原因:该mysql用户不允许远程登录 解决:授权 1> 允许用户从任何主机连接到mysql server GRANT ALL PRIVILEGES ON *.* TO 'username'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION; FLUSH PRIVILEGES; 2> 允许用户从指定IP访问mysql server 其中,host为特定IP地址 GRANT ALL PRIVILEGES ON *.

ERROR 1130: Host 'xxxx' is not allowed to connect to this MySQL server

解决方法:1. 改表法.可能是你的帐号不允许从远程登陆,只能在localhost.这个时候只要在localhost的那台电脑,登入mysql后,更改 "mysql" 数据库里的 "user" 表里的 "host" 项,从"localhost"改称"%" mysql -uroot -p123456>use mysql;mysql>update user set host = '%' where u

遇到问题,本地PHP环境连接其他主机的Mysql 出现ERROR 1130: Host '192.168.1.222' is not allowed to connect to this MySQL server

问题描述,1 检查mysql服务是否启动, 2 关闭防火墙                    Netfilter/Iptables    关闭方式[[email protected] ~]#iptables -F                    SELINUX     关闭方式 [[email protected] ~]#setsebool -P samba_enable_home_dir on             3 查看是否有监听mysql端口  netstat -an |gr

IT忍者神龟之mysql远程连接:ERROR 1130 (HY000): Host '*.*.*.*' is not allowed to connect to this MySQL server解决

安装完MySQL后,远程连接数据库的时候,出现 ERROR 1130 (HY000): Host '192.168.0.1' is not allowed to connect to this MySQL server提示信息,不能远程连接数据库.考虑可能是因为系统数据库mysql中user表中的host是localhost的原因,于是,我尝试把这个值改为自己服务器的ip,果然就好用了,不过用 mysql -u root -p命令就连不上数据库了,需要用mysql -h 服务器ip -u roo

mysql 1130 ERROR 1130: Host xxx.xxx.xxx.xxx is not allowed to connect to this MySQL server

mysql -u root -p  mysql;use mysql;  mysql;select 'host' from user where user='root';  mysql;update user set host = '%' where user ='root';  mysql;flush privileges; mysql 1130 ERROR 1130: Host xxx.xxx.xxx.xxx is not allowed to connect to this MySQL se

ERROR 1130: Host '192.168.1.3' is not allowed to connect to this MySQL ERROR 1062 (23000): Duplicate entry '%-root' for key 'PRIMARY'

use mysql mysql> select host, user from user; 将相应用户数据表中的host字段改成'%': update user set host='%' where user='root'; ERROR 1062 (23000): Duplicate entry '%-root' for key 'PRIMARY' 不予理会 flush privileges; 重新远程连接OK ERROR 1130: Host '192.168.1.3' is not allo