HOST 192.168.--- 不允许连接Mysql服务器 [英] HOST 192.168.--- not allowed to connect Mysql server
问题描述
目前我使用的是 VS 2010 和 MySQL Workbench,但是当我运行代码时,我看到了这个错误:
Currently I am using VS 2010 and MySQL Workbench, but when I run the code I see this error:
'不允许主机'localhost'连接到这个MySQL服务器'.
'Host 'localhost' is not allowed to connect to this MySQL server'.
我在 Windows Server 2012 r2 中安装了 MySQL Workbench,当我尝试使用 IP 地址登录时,我收到类似
I have installed MySQL Workbench in Windows Server 2012 r2, when I tried to login using IP address I am getting error like
不允许主机 xxx 连接到此 MYSQL 服务器.
Host xxx is not allowed to connect to this MYSQL server.
推荐答案
我认为这是一个安全问题.
Thats a security issue i think.
请在 mysql 数据库上重新创建新用户.
Please recreate new user on the mysql database.
CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 'username'@'localhost' WITH GRANT OPTION;
CREATE USER 'username'@'%' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 'username'@'%' WITH GRANT OPTION;
FLUSH PRIVILEGES;
之后,请重启MYSQL服务.
After that, please restart MYSQL Services.
这篇关于HOST 192.168.--- 不允许连接Mysql服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!