Link to home
Start Free TrialLog in
Avatar of pvinodp
pvinodp

asked on

how to solve "Can't connect to local MySQL server through socket"

I tried to start the mysqld service in linux and I got the following error:

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

how to resolve this issue
Avatar of mayankagarwal
mayankagarwal
Flag of India image

ASKER CERTIFIED SOLUTION
Avatar of upanwar
upanwar
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
first try to restart mysql service:

# /etc/init.d/mysql restart
or
service mysql restart

then do dmesg, and
cat /var/log/mysql/error.log

and send here.

problem is 1. Mysql not running
2. MySQL can't run (broken, or wrong config)
3. service can't access to MySQL socket.
Service don't have permission to open .sock (if u change rights manualy)
Avatar of pvinodp
pvinodp

ASKER

Very similar to my previous related post,,,
Thanks
 anyways