When I try to start mysql at the terminal, I get an error similar to the following:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket'/tmp/mysql.sock'(2)
I tried the following solution, but it was impossible.
http://d.hatena.ne.jp/TamaC/20090330/1238418696
Please tell me the cause and how to solve it
mysql
(2)
in the error message indicates the error number.
Issue the error command in order to know what the error number means.
%error2
OS error code 2: No such file or directory
In other words, there is no /tmp/mysql.sock
.
Possible causes include:
Mysqld has not started.
You may want to check if mysqld is started using the ps command.
The location of the mysql.sock file used by the mysqld and mysql commands during startup is different.
Socket files used by the mysqld command can be found in mysqld --help-v | grep^socket
.
© 2024 OneMinuteCode. All rights reserved.