#2002 - 服务器没有响应or the local MySQL server's socket
来源:互联网 发布:光盘数据恢复 编辑:程序博客网 时间:2024/06/04 18:32
#2002 - 服务器没有响应or the local MySQL server's socket
经常见有兄弟遇到这样的问题:
mysql -u root -p一切正常,但是用phpmyadmin却死活不对,提示如下错误:
#2002 - 服务器没有响应 (or the local MySQL server's socket is not correctly configured)
mysql -u root -p一切正常,但是用phpmyadmin却死活不对,提示如下错误:
#2002 - 服务器没有响应 (or the local MySQL server's socket is not correctly configured)
我 google 了一下,发现很多人被这个问题困扰,大家解决方法的思路都是围绕 mysql.sock,改mysql.sock的位置。而实际上,通过修改 mysql.sock 路径解决问题的可能性很小。
大部分这类问题是由于 mysql 做了 ip 绑定(bind-address = 127.0.0.1)造成的。这里只需要将 $cfg['Servers'][$i]['host'] = 'localhost' 改为 '127.0.0.1' 就可以了。或者改成localhost.localdomain,这样改的依据是more /etc/hosts,可以看到localhost和localhost.localdomain被解析为127.0.0.1的,而mysql的my.cnf里面大家都加了bind-address = 127.0.0.1,所以要修改$cfg['Servers'][$i]['host']。
0 0
- #2002 - 服务器没有响应 (or the local MySQL server's socket is not correctly configured)
- #2002 - 服务器没有响应 (or the local MySQL server's socket is not ...
- #2002 - 服务器没有响应 (or the local MySQL server's socket is not correctly configured)解决
- #2002 - 服务器没有响应or the local MySQL server's socket
- #2002 - 服务器没有响应or the local MySQL server's socket
- #2002 - Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) 服务器无响应(或者
- mysql ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.s
- /etc/init.d/mysql: No such file or directory 和 ERROR 2002 (HY000): Can't connect to local MySQL server through socket 解决办法
- ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/usr/local/mysql/mysql.sock'
- ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql
- Mysql error 2002 (HY000) : Can't connect to local MySQL server through socket '/tmp/mysql.sock'
- mysql error 2002 (HY000) : Can't connect to local MySQL server through socket '/tmp/mysql.sock'
- ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/mysql/mysql.sock' (2)
- #2002 - 服务器没有响应 (或者本地 MySQL 服务器的套接字没有正确配置)
- phpmyadmin error:#2002 - 服务器没有响应 (或者本地 MySQL 服务器的套接字没有正确配置)
- 解决:#2002 - 服务器没有响应 (或者本地 MySQL 服务器的套接字没有正确配置)
- ERROR 2002: Can't connect to local MySQL server through socket '/tmp/tmp/mysql.sock' (2)
- ERROR 2002: Can't connect to local MySQL server through socket '/tmp/tmp/mysql.sock' (2)
- poj2376
- (hdu 简单题 128道)平方和与立方和(求一个区间的立方和和平方和)
- file
- LeetCode OJ : Remove Duplicates from Sorted Array
- zoj 1489 2^x mod n = 1
- #2002 - 服务器没有响应or the local MySQL server's socket
- XCode6以后pch文件的添加
- HADOOP常用命令
- POJ 1324 贪吃蛇状态压缩BFS
- 关于闭包
- 浅谈Objective-C异常处理
- js优化
- time_t 与字符串之间的相互转换
- java线程