mysql本地访问linux服务器,出现SQLSTATE[HY000] [1130] Host '127.0.0.1' is not allowed to connect to this

解决方案:网上看了说,更改mysql库的user表,添加一条host为%的数据就可以,但是还是不行。后来,直接登录mysql,给访问加权限就可以了。

执行

[[email protected] ~]# GRANT ALL PRIVILEGES ON *.* TO ‘username‘@‘%‘ IDENTIFIED BY ‘userpwd‘ WITH GRANT OPTION;

就可以了

版权声明:本文为博主原创文章,未经博主允许不得转载。

mysql本地访问linux服务器,出现SQLSTATE[HY000] [1130] Host '127.0.0.1' is not allowed to connect to this

时间: 2024-08-08 22:09:30

mysql本地访问linux服务器,出现SQLSTATE[HY000] [1130] Host '127.0.0.1' is not allowed to connect to this的相关文章

1130 - Host'xxx.xxx.xxx.xxx' is not allowed to connect to this MySQL server解决Navicat连接MySQL报错

最近使用Navicat for MySQl访问远程mysql数据库,出现报错,显示"1130 - Host'xxx.xxx.xxx.xxx' is not allowed to connect to this MySQL server".解决办法如下: 方法/步骤 首先看报错窗口. 经查阅,错误原因是:本地IP(xxx.xxx.xxx.xxx)没有访问远程数据库的权限. 于是下面开启本地IP(xxx.xxx.xxx.xxx)对远程mysql数据库的访问权限. 首先远程连接进入服务器,在

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

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

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 -proot2.进入数据库

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

解决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

远程mysql出现ERROR 1130 (HY000): Host '172.17.42.1' is not allowed to connect to this MySQL server

ERROR 1130: Host ***.***.***.*** is not allowed to connect to this MySQL server 说明所连接的用户帐号没有远程连接的权限,只能在本机(localhost)登录. 需更改 mysql 数据库里的 user表里的 host项 把localhost改称% 具体步骤:登陆到MySQL 首先 use mysql: 按照别人提供的方式update的时候,出现错误. MySQL> update user set host='%' w

MySQL 1130 - Host 127.0.0.1 is not allowed to connect to this MySQL server

在开发中为了让开发更方便,在本地配置环境,希望可以直接访问服务器上的MySQL数据库,更方便的管理数据库, 需要在本地远程连接linux服务器的本地数据库,直接用数据库管理工具连接出现如下报错1130 - Host 127.0.0.1 is not allowed to connect to this MySQL server: 这个错误说明MySQL没有允许远程登录,只要授权可以远程登录就ok了. 登录到服务器上,mysql -u root -p 回车,password:(输入你的密码),进入