ERROR 2002 (HY000): Can't connect to local MySQL server thr_MySQL
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'解决
用XAMPP装装好mysql之后,mysql -uroot 连不上,报这个错误:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'
在mysql的配置文件里,/opt/lampp/etc/my.cnf, 发现了这样的配置:
[java]
# The following options will be passed to all MySQL clients
[client]
#password = your_password
port = 3306
socket = /opt/lampp/var/mysql/mysql.sock
# Here follows entries for some specific programs
# The MySQL server
[mysqld]
user = nobody
port = 3306
socket = /opt/lampp/var/mysql/mysql.sock
上一篇: php 常用分页代码
下一篇: PHP访问MySql数据库介绍
推荐阅读
-
连接Mysql提示Can’t connect to local MySQL server through socket的解决方法
-
MYSQL ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.10.210' (111) 解决方法
-
MySQL错误 ERROR 2002 (HY000): Can't connect to local MySQL server through socket 的解决办法
-
ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)解决办法
-
Can't connect to local MySQL server through socket
-
linux安装MySQL后输入mysql显示 ERROR 2002 (HY000): Can't connect to local MySQL server through socket
-
远程连接centos7 上的mysql报(ERROR 2003 (HY000): Can't connect to MySQL server on '168.x.x.x' (10060) )
-
关于CentOS输入mysql提示ERROR 2002 (HY000):Can't connect to_MySQL
-
ERROR 2002 (HY000): Can't connect to local MySQL server thro
-
【解决】Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.soc