gpt4 book ai didi

mysql远程连接问题

转载 作者:行者123 更新时间:2023-11-29 08:50:24 25 4
gpt4 key购买 nike

我在Linux系统上安装了MySQL。我运行的是 Debian。我可以通过本地系统上的命令以及远程方式使用本地IP地址访问mysql

./mysql -h 192.168.1.151 -u root -pabcd

。现在我添加了一个主机(192.168.1.152),并且我无法使用AddedHost从其他机器远程连接,我已向该主机授予所有权限

grant all on *.* to 'root'@'192.168.1.152' identified by 'abcd';

但我无法进行本地和远程连接。当我执行命令时出现错误

./mysql -h 192.168.1.152 -u root -pabcd

错误 2003 (hy000) 无法连接到“192.168.1.152”(111) 上的 mysql 服务器

请帮我解决这个问题。谢谢拉胡尔

最佳答案

此错误意味着 from here(FAQ)-

  • There is no MySQL server running at the specified host

  • Connection to the MySQL server is not allowed using TCP-IP. Check the 'skip-networking' setting in the MySQL configuration file (my.ini on Windows, my.cnf on Unix/Linux). It shall be commented out like '#skip-networking'. If it is not commented out, then do it and restart the MySQL server for the change to take effect. SQLyog needs to connect using TCP-IP.

  • Some networking issue prevents connection. It could be a network malconfiguration or a firewall issue. We have experienced sometimes that some firewalls (ZoneAlarm in particular) is blocking TCP-IP connections even if it claims to be disabled. Most often it will help to uninstall and reinstall the firewall.

  • When trying to connect to a MySQL server at an ISP this error message often indicates that direct connection to MySQL has been blocked. You must then use HTTP-tunneling or SSH-tunneling to connect.

关于mysql远程连接问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11430499/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com