Host 'localhost' is not allowed to connect to this MySQL server解决

1. 首先停止mysql服务

2. 然后打开一个命令行窗口(win+r),然后切换到mysql安装目录的bin下,例如我的路径是:F:\mysql\mysql5.5\bin。命令为:

cd F:\mysql\mysql5.5\bin    回车

输入:mysqld --skip-grant-tables   回车

3. 再重新打开一个命令行窗口(win+r),同样切换到mysql安装目录的bin下

cd F:\mysql\mysql5.5\bin   回车

mysql -u root -p  回车

输入密码:〈输入你要设置的新密码〉  回车

此时,即可经常链接了。

Host 'localhost' is not allowed to connect to this MySQL server解决

时间: 2024-08-25 17:22:54

Host 'localhost' is not allowed to connect to this MySQL server解决的相关文章

MySql数据库:Host 'localhost' is not allowed to connect to this MySQL server

修改mysql的root密码后,出现Host 'localhost' is not allowed to connect to this MySQL server 错误. 解决办法: C:\Program Files\MySQL\MySQL Server 5.5\my.ini 在[mysqld]下加下面两行, skip-name-resolveskip-grant-tables 重启mysql的windows服务 MySql数据库:Host 'localhost' is not allowed

1130 - Host 'localhost' is not allowed to connect to this MySQL server

打开Win7上的Navicat for MySQL后,连接localhost时,提示错误: 其解决方法是: 打开c:/Program Files/MySQL/MySQL Server 5.5下的my.ini文件,查看是否在在[mysqld]的段中存在: skip-grant-tables . 如果没有,添加即可. 目的是跳过MySQL的访问控制,任何人都可以在控制台以管理员的身份进入MySQL数据库. 注意: 在修改完密码以后要把MySQL服务器停掉重新启动才会生效.其方法是在win7中,打开控

mysql 出现Host 'localhost' is not allowed to connect to this MySQL server 错误。

mysql 出现Host 'localhost' is not allowed to connect to this MySQL server 错误. 解决办法: C:\Program Files\MySQL\MySQL Server 5.5\my.ini   自己的安装目录 在[mysqld]下加下面两行, skip-name-resolveskip-grant-tables 重启mysql的windows服务 mysql 出现Host 'localhost' is not allowed t

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

message from server: "Host 'xxx' is not allowed to connect to this MySQL server的解决

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

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

Host 'xxx' is not allowed to connect to this MySQL server.

mysql开启远程连接 今天在服务器安装了mysql,准备用mysqlguitools远程登录的时候出错,提示:Host 'xxx' is not allowed to connect to this MySQL server.网上找了一些资料,是mysql未开启mysql远程访问权限导致. 记录解决方案供以后参考.: 1.登录到mysql:  mysql -uroot -ppwd 2.查看user表: mysql> use mysqlDatabase changedmysql> select

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数据库的访问权限. 首先远程连接进入服务器,在

解决MySql报错:1130 - Host 'xxx' is not allowed to connect to this MySQL server的方法

发现问题 使用Navicat连接MySql数据库时,未能成功,提示信息如下图: 这个错误提示已经很明确了,"不允许主机'desktop-teat9ob'连接到此mysql服务器",知道问题所在就好解决了. 解决办法 我们远程联接到MySql服务器,打开服务器本地Navicat软件,在查询编辑器中执行下面的SQL语句 #查询允许连接的主机及用户信息 select Host,User,Password from mysql.user; 结果如下图: 从结果中可以看到,MySql只允许使用r