Skip to main content

MySQL error /var/lib/mysql/mysql.sock

Comments

6 comments

  • danrussell
    Hi :), Firstly check the path of mysql.sock in /etc/my.cnf file on your server. Normally it is set as "socket=/var/lib/mysql/mysql.sock" (without quotes) under [mysqld] section. Then check if mysql.sock file present under /var/lib/mysql/, if not, then symlink the file which is in /tmp folder. For that, stop MySQL service first, then execute below command: ln -s /tmp/mysql.sock /var/lib/mysql/mysql.sock and then start MySQL.
    0
  • cPanelMichael
    Hello :) Do you notice any errors in the MySQL error log when this occurs (/var/lib/mysql/$hostname.err)? Have you attempted to modify your /etc/my.cnf file based on tuner results? Thank you.
    0
  • elias9
    the problem return again :( root@serv [~]# tail -10 /var/lib/mysql/serv.myhost.com.err 2015-02-20 21:58:56 20542 [Note] InnoDB: Highest supported file format is Barracuda. 2015-02-20 21:58:57 20542 [Note] InnoDB: 128 rollback segment(s) are active. 2015-02-20 21:58:57 20542 [Note] InnoDB: Waiting for purge to start 2015-02-20 21:58:57 20542 [Note] InnoDB: 5.6.22 started; log sequence number 2127359851 2015-02-20 21:58:57 20542 [Note] Server hostname (bind-address): '127.0.0.1'; port: 3306 2015-02-20 21:58:57 20542 [Note] - '127.0.0.1' resolves to '127.0.0.1'; 2015-02-20 21:58:57 20542 [Note] Server socket created on IP: '127.0.0.1'. 2015-02-20 21:58:57 20542 [Note] Event Scheduler: Loaded 0 events 2015-02-20 21:58:57 20542 [Note] /usr/sbin/mysqld: ready for connections. Version: '5.6.22' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server (GPL)
    0
  • elias9

    2015-02-21 01:51:46 16179 [Note] Plugin 'FEDERATED' is disabled. 2015-02-21 01:51:46 16179 [Note] InnoDB: Using atomics to ref count buffer pool pages 2015-02-21 01:51:46 16179 [Note] InnoDB: The InnoDB memory heap is disabled 2015-02-21 01:51:46 16179 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins 2015-02-21 01:51:46 16179 [Note] InnoDB: Memory barrier is not used 2015-02-21 01:51:46 16179 [Note] InnoDB: Compressed tables use zlib 1.2.3 2015-02-21 01:51:46 16179 [Note] InnoDB: Using Linux native AIO 2015-02-21 01:51:46 16179 [Note] InnoDB: Using CPU crc32 instructions 2015-02-21 01:51:46 16179 [Note] InnoDB: Initializing buffer pool, size = 256.0M 2015-02-21 01:51:46 16179 [Note] InnoDB: Completed initialization of buffer pool 2015-02-21 01:51:46 16179 [Note] InnoDB: Highest supported file format is Barracuda. 2015-02-21 01:51:46 16179 [Note] InnoDB: The log sequence numbers 2127359851 and 2127359851 in ibdata files do not match the log sequence number 2134996419 in the ib_logfiles! 2015-02-21 01:51:46 16179 [Note] InnoDB: Database was not shutdown normally! 2015-02-21 01:51:46 16179 [Note] InnoDB: Starting crash recovery. 2015-02-21 01:51:46 16179 [Note] InnoDB: Reading tablespace information from the .ibd files... 2015-02-21 01:51:47 16179 [Note] InnoDB: Restoring possible half-written data pages 2015-02-21 01:51:47 16179 [Note] InnoDB: from the doublewrite buffer... 2015-02-21 01:51:48 16179 [Note] InnoDB: 128 rollback segment(s) are active. 2015-02-21 01:51:48 16179 [Note] InnoDB: Waiting for purge to start 2015-02-21 01:51:48 16179 [Note] InnoDB: 5.6.22 started; log sequence number 2134996419 2015-02-21 01:51:48 16179 [Note] Server hostname (bind-address): '127.0.0.1'; port: 3306 2015-02-21 01:51:48 16179 [Note] - '127.0.0.1' resolves to '127.0.0.1'; 2015-02-21 01:51:48 16179 [Note] Server socket created on IP: '127.0.0.1'. 2015-02-21 01:51:48 16179 [Note] Event Scheduler: Loaded 0 events 2015-02-21 01:51:48 16179 [Note] /usr/sbin/mysqld: ready for connections. Version: '5.6.22' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server (GPL) 150221 01:55:43 mysqld_safe Number of processes running now: 0 150221 01:55:43 mysqld_safe mysqld restarted 150221 01:56:00 mysqld_safe mysqld from pid file /var/lib/mysql/serv.myhost.com.pid ended
    0
  • cPanelMichael
    You may want to try tuning your MySQL configuration if it continues to crash. The following thread offers information on a MySQL tuning script: mysqlmymonlite.sh server stats gathering tool for cPanel Server Thank you.
    0
  • elias9
    MySQL failing Hello, mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) /home/thesymbi/public_html/includes/class_core.php on line 274 I get this around 50 times a day! I am fed up ! Errors Logs: root@serv [~]# tail -10 /var/lib/mysql/serv.myhost.com.err 2015-02-20 21:58:56 20542 [Note] InnoDB: Highest supported file format is Barracuda. 2015-02-20 21:58:57 20542 [Note] InnoDB: 128 rollback segment(s) are active. 2015-02-20 21:58:57 20542 [Note] InnoDB: Waiting for purge to start 2015-02-20 21:58:57 20542 [Note] InnoDB: 5.6.22 started; log sequence number 2127359851 2015-02-20 21:58:57 20542 [Note] Server hostname (bind-address): '127.0.0.1'; port: 3306 2015-02-20 21:58:57 20542 [Note] - '127.0.0.1' resolves to '127.0.0.1'; 2015-02-20 21:58:57 20542 [Note] Server socket created on IP: '127.0.0.1'. 2015-02-20 21:58:57 20542 [Note] Event Scheduler: Loaded 0 events 2015-02-20 21:58:57 20542 [Note] /usr/sbin/mysqld: ready for connections. Version: '5.6.22' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server (GPL) 2015-02-21 01:51:46 16179 [Note] InnoDB: Starting crash recovery. 2015-02-21 01:51:46 16179 [Note] InnoDB: Reading tablespace information from the .ibd files... 2015-02-21 01:51:47 16179 [Note] InnoDB: Restoring possible half-written data pages 2015-02-21 01:51:47 16179 [Note] InnoDB: from the doublewrite buffer... 2015-02-21 01:51:48 16179 [Note] InnoDB: 128 rollback segment(s) are active. 2015-02-21 01:51:48 16179 [Note] InnoDB: Waiting for purge to start 2015-02-21 01:51:48 16179 [Note] InnoDB: 5.6.22 started; log sequence number 2134996419 2015-02-21 01:51:48 16179 [Note] Server hostname (bind-address): '127.0.0.1'; port: 3306 2015-02-21 01:51:48 16179 [Note] - '127.0.0.1' resolves to '127.0.0.1'; 2015-02-21 01:51:48 16179 [Note] Server socket created on IP: '127.0.0.1'. 2015-02-21 01:51:48 16179 [Note] Event Scheduler: Loaded 0 events 2015-02-21 01:51:48 16179 [Note] /usr/sbin/mysqld: ready for connections. Version: '5.6.22' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server (GPL) 150221 01:55:43 mysqld_safe Number of processes running now: 0 150221 01:55:43 mysqld_safe mysqld restarted 150221 01:56:00 mysqld_safe mysqld from pid file /var/lib/mysql/serv.myhost.com.pid ended Please someone help me out urgently
    0

Please sign in to leave a comment.