Minggu, 28 September 2014

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

Here we go............ There are two things that could go wrong here:

1. You don't have permissions to access the directory /var/lib/mysql/whatever.sock because mysql is the owner of the folder
or
2. /path/whatever.sock doesn't exist.

You can try this though [Linux specific, but what other operating systems are there?]
Go to /etc/my.cnf and change/add the lines:

[mysqld]
datadir=/var/lib/mysql
socket=/tmp/mysql.sock
[client]
socket=/tmp/mysql.sock

This way the client and server use the same socket and it's in a public directory. This solves my MySql problems 98% of the time.


Jakub TCP

Linux localhost.localdomain 2.6.9-11.ELsmp

Sumber : http://forums.mysql.com/read.php?11,27769,59865

0 komentar:

Posting Komentar

luvne.com ayeey.com cicicookies.com mbepp.com kumpulanrumusnya.com.com tipscantiknya.com