[英]MySQL connection ERROR 2003 (HY000): <IP Address> (110)
I have searched and seen a lot of questions and answers for this error but none of them worked for me. 我已经搜索并看到了很多有关此错误的问题和解答,但没有一个对我有用。 I have my MySQL in my laptop via Xampp and wanted to connect my Raspberry Pi to it using a direct LAN connection (ethernet cable).
我通过Xampp将MySQL安装在笔记本电脑中,并希望使用直接LAN连接(以太网电缆)将Raspberry Pi连接到它。 Whenever I enter
mysql -u root -p -h 192.168.1.47
on my Raspberry pi, after typing my password, there is a long pause, then the error ERROR 2003 (HY000): Can't connect to MySQL server (110)
shows up. 每当我在Raspberry pi上输入
mysql -u root -p -h 192.168.1.47
时,输入密码后,都会有很长的暂停时间,然后出现错误ERROR 2003 (HY000): Can't connect to MySQL server (110)
显示起来。 Any help please? 有什么帮助吗? If you need more information, just ask and tell me what commands to input to show them, I'm still a beginner.
如果您需要更多信息,请询问并告诉我要输入哪些命令以显示它们,我仍然是初学者。
Also, I have commented the bind-address
in the my.cnf but still have this error. 另外,我已在my.cnf中注释了
bind-address
,但仍然出现此错误。
What you want to establish is a remote connection. 您要建立的是远程连接。 The default configuration of MySQL doesn't allow it.
MySQL的默认配置不允许它。 It's best to configure MySQL that it allows remote connection.
最好配置允许远程连接的MySQL。 Here is an other SO question with detailed answer about configuring MySQL to allow remote connection from the Raspberry Pi device to a MySQL server.
这是另一个SO问题,提供有关配置MySQL以允许从Raspberry Pi设备到MySQL服务器的远程连接的详细答案。
Also, don't forget to check the firewall rules from your computer. 另外,不要忘记从计算机检查防火墙规则。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.