Mysql远程连接报错:SQL Error (1130): Host '192.168.6.128' is not allowed to connect to this MySQL server

通过SQLyog连接linux中的MySQL报错问题:
SQL Error (1130): Host ‘192.168.6.128‘ is not allowed to connect to this MySQL server
说明你所连接的用户账户没有远程连接的权限,只能在本机localhost登录
需要更改 mysql 数据库里的 user表里的 host字段 把localhost改称%
下面是我设置的远程连接步骤,请参考:
 1.登录MySQL
  mysql -uroot -proot
2.进入数据库
  use mysql;
3.查看是否有user表
 show tables;
4.更改lost字段值
 update user set host=‘%‘ where host = ‘localhost‘;
5.刷新
 flush pricilges;
6.查看
 select host,user from user;

出现上面的界面,说明远程连接成功,最后quit退出了

Mysql远程连接报错:SQL Error (1130): Host '192.168.6.128' is not allowed to connect to this MySQL server

原文地址:https://www.cnblogs.com/hailong88/p/10487815.html

时间: 2024-08-08 01:28:41

Mysql远程连接报错:SQL Error (1130): Host '192.168.6.128' is not allowed to connect to this MySQL server的相关文章

遇到问题,本地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

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

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

当使用Mysql帐号远程登陆的时候,出现类似如下错误:ERROR 1130: Host '192.168.1.3' is not allowed to connect to this MySQL 解决办法: 1. 改表法(可能是你的帐号不允许从远程登陆,只能在localhost.这个时候只要在localhost的那台电脑,登入mysql后,更改 "mysql" 数据库里的 "user" 表里的 "host" 项,从"localhost&

ERROR 1130 (HY000): 192.168.111.1'' is not allowed to connect to this MySQL server

root 无法通过navicat 远程以root登录 虚机授予权限并刷新 GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'; FLUSH PRIVILEGES; ERROR 1130 (HY000): 192.168.111.1'' is not allowed to connect to this MySQL server

解决ERROR 1130 (HY000): Host '192.168.1.9' is not allowed to connect to this MySQL server

本机是mysql的数据库,想用另一台ip为192.168.1.9的连接这个mysql数据库,可是报了这个错误. 查询得到2个方法 第一个是在user表把localhost改为%, 我这么做后不仅没有解决,本地连接都要[email protected]%这么做了(现在想想好像失误把所有localhost都给改了). 第二个方法就生效了. 终端登陆mysql,执行一句sql: GRANT ALL PRIVILEGES ON *.* TO 'root'@'192.168.1.9' IDENTIFIED

ERROR 1130 (HY000): Host '192.168.0.190' is not allowed to connect to this MySQL serv

环境: CentOS6.2.MySQL5.1 问题描述: 在配置文件中将需要连接的MySQL的host设置为192.168.0.190(其实就是我自己的IP地址),然后运行自己的程序,结果返回MySQL错误提示,如标题所示.根据字面意思就是不允许通过192.168.0.190连接MySQL服务器. 问题分析: 根据错误提示分析,使用localhost连接MySQL是可以的,但是192.168.0.190去连接却被拒绝,那么首先肯定数据库服务器是没有问题的,应该是权限的问题,因为自己对MySQL也

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

Mysql远程登录报错:Host '192.168.1.3' is not allowed to connect to this MySQL server

你要访问的MySQL服务器设置了访问权限:如果那个服务器是你自己搭建的解决办法如下,但如果不是你的请管理员帮你添加权限 解决办法1: # 1. 改表 # 登录数据库:mysql -u root -p mysql>use mysql; mysql>update user set host = '%' where user = 'root'; mysql>FLUSH PRIVILEGES; 2. 授权法. (1)例如,你想myuser使用mypassword从任何主机连接到mysql服务器的

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

问题描述 在使用SQLyog操作Linux上的MariaDB时候,会出现如下错误: 解决方法 改表法 可能是你的帐号不允许从远程登陆,只能在localhost.这个时候只要在localhost的那台电脑,登入mysql后,更改 "mysql" 数据库里的 "user" 表里的 "host" 项,从"localhost"改称"%" 具体操作为: 连接mysql服务器:mysql -u root -p 看当前所