GET 24/7 LIVE HELP NOW

Announcement

Announcement Module
Collapse
No announcement yet.

Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'

Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'

    Hi,

    I've got a problem.

    I'm running Percona 5.5.35 on a LAMP stack.

    The application can communicate with the database just fine, but when I try to run automysqlbackup I get the error: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

    That's the same socket path specified in my.cnf.

    Any help is much appreciated.
    Thanks.

  • #2
    The error simply states that your MySQL is not available/running to accept any connection. Are you able to connect to MySQL via CLI when you get this error? What does the error logs say?

    Comment


    • #3
      Hi,

      How you are running automysqlbackup? Is it possible for you to give socket details in that?
      Also as Jagatvir said, Is your MySQL running? In Linux, you can simply check with "ps -ef | grep mysql"
      I would also suggest to check that automysqlbackup is trying to connect to the same host which you are connecting through application.

      Comment


      • #4
        As far as I could see:
        http://sourceforge.net/projects/automysqlbackup/

        It supports "socket" option.

        You can also check if the following exists in you mysql configuration (my.cnf) and if no then add it:

        [client]
        socket = /var/run/mysqld/mysqld.sock

        Comment

        Working...
        X