Sunday, 15 July 2012

linux - RHEL mysql cannot connect through the socket, permissions and locations are set properly, curious about the reasons -



linux - RHEL mysql cannot connect through the socket, permissions and locations are set properly, curious about the reasons -

i had problem on weekend. mysql started giving "can't connect local mysql server through socket '/var/lib/mysql/mysql.sock'" error on weekend.

as suggested, checked location of socket file, , in right spot.

then checked permission of folders, , set 0755.

then checked disk space , there plenty of it.

then performed graceful server restart. solved problem.

my question, these given, can cause issue? our production server , need due diligence root of prevent happening.

edit:

i not attempting resolve issue, attempting investigate cause.

my.cnf has set:

datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock

thank you.

the lastly time ran issue, able around setting host parameter (-h127.0.0.1).

i'm not sure why worked though, or rather, i'm not sure specific configuration issues lead it. there can different mysql.sock files @ same time, or in unexpected places (for example, on lastly work machine accidentally had 3 instances in different directories).

mysql linux

No comments:

Post a Comment