2010年2月3日 星期三

mysql -u root -p error

> ERROR 2002 (HY000): Can't connect to local MySQL
> server through socket '/tmp/mysql.sock' (111)

Does this socket file exist? It may be located in /var/lib/mysql instead. Either set the MYSQL_UNIX_PORT environment variable to point to the location of the socket file or add the following to the [client] section of /etc/my.cnf:

socket=/path/to/your/mysql.sock

See http://dev.mysql.com/doc/refman/4.1/en/problems-with-mysql-sock.html for more details.

沒有留言:

張貼留言