Home >Database >Mysql Tutorial >Can't connect to MySQL server的解决办法_MySQL

Can't connect to MySQL server的解决办法_MySQL

WBOY
WBOYOriginal
2016-06-01 13:20:221226browse

bitsCN.com 1.查看配置文件:

skip-networking #注释掉 因为它是屏蔽掉一切TCP/IP连接

bind-address = 127.0.0.1 #它和上一个选项是异曲同工,要想远程连接,也得注释掉

2.如果以上工作都做过还是出现:


ERROR 2003 (HY000): Can't connect to MySQL server on '*.*.*.*' (113),那就得考虑防火墙的问题了,关掉防火墙/etc/rc.d/init.d/iptables stop



修改完后需要 restart mysql (/etc/init.d/mysql restart)
bitsCN.com

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn