mysql,mysqldump,mysqladmin,php connecting to MySQL service often prompts the following error:
1
error 2002 (hy000: can ' t connect to local MySQL server through Socket ' /var/lib/mysql/mysqlsock ' (2
As shown below, PHP connection MySQL error:
SQLSTATE[HY000] [2002] Can ' t connect to local MySQL server through socket ' MySQL ' (2)
The test code is as follows:getmessage ();}" Solutions "Change host=localhost to host=127.0.0.1 !
mysql,mysqldump,php connecting to MySQL service often prompts the following error:ERROR 2002 (HY000): Can ' t connect to local MySQL server through socket '/var/lib/mysql/mysql.sock ' (2)There are typically two reasons for this problem:1. The MySQL
Sometimes when we use commands such as "MySQL", "mysqladmin", "mysqldump" to manage the database, the server throws an error similar to the following:
1
ERROR 2002 (HY000): Can‘t connect to local MySQL server through socket
Starting the MySQL service often prompts the following error:ERROR 2002 (HY000): Can ' t connect to local MySQL server through socket '/var/lib/mysql/mysql.sock 'This is due to the mysql.sock location of the socket file that modifies the MySQL
Solution to connect MySQL hint can ' t connect to local MySQL server through socketSeptember 6, 2013 aiezu Comment Read reviewMySQL, mysqldump,mysqladmin,php connection MySQL service often prompts the following error:ERROR 2002 (HY000): Can ' t
mysql -urootERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)This is a problem where the socket cannot be found when MySQL logs on.The first thing to understand is that the Linux side of MySQL server
After installing MySQL, after using the new configuration file, the MySQL server can start successfully, but at the time of login error 2002 (HY000): Can ' t connect to local MySQL server through socket, That is, you cannot connect to the MySQL
Today, my colleague A found me that Mysql server X has A high load and queries are slow. After a while of failure, we watched it together.
[Root @ redhat var] # uname-
Linux xxx 2.6.18-128. el5 #1 SMP Wed Dec 17 11:41:38 EST 2008 x86_64 x86_64 x86_64
Mysql is installed in linux today, but Can't connect to local MySQL server through socket '/var/lib/mysql appears during connection. sock prompts. Below I will summarize some solutions and some parameter documents for Baidu search.
In linux. The
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.