标题: 【已解决】Can't connect to local MySQL server through socket '3306' [打印本页] 作者: bill01 时间: 2010-07-15 10:48 标题: 【已解决】Can't connect to local MySQL server through socket '3306' 本帖最后由 bill01 于 2010-07-15 13:53 编辑
连接mysql的时候出现问题:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '3306' (2)
具体
[root@host]# mysql -u root -p -h localhost
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '3306' (2)
[root@host]# mysql -u root -p -h 127.0.0.1
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 691
Server version: 5.0.77 Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
和防火墙应该没关系
因为是本地连接
另外ping 127.0.0.1正常
ping localhost也正常
问题应该不在这里
但具体哪里 找不到 头大作者: shang2010 时间: 2010-07-15 11:18
[root@host]# mysql -u root -p -h 127.0.0.1
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 691
Server version: 5.0.77 Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.