The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

MySQL PID could not be found

Discussion in 'Database Discussions' started by Mike Flanagan, Feb 20, 2015.

  1. Mike Flanagan

    Mike Flanagan Registered

    Joined:
    Feb 20, 2015
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Telford, United Kingdom
    cPanel Access Level:
    Root Administrator
    I run a server that hosts around 200 websites.

    After a power outage yesterday, MySQL has failed to come back online.

    A tail of hostname.err returns:

    Code:
    150220  9:44:28 InnoDB: highest supported file format is Barracuda.
    InnoDB: The user has set SRV_FORCE_NO_LOG_REDO on
    InnoDB: Skipping log redo
    InnoDB: Error: tried to read 16384 bytes at offset 0 4915200.
    InnoDB: Was only able to read 4096.
    InnoDB: Fatal error: cannot read from file. OS error number 17.
    150220  9:44:32  InnoDB: Assertion failure in thread 139944215033600 in file os0file.c line 2538
    InnoDB: We intentionally generate a memory trap.
    InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
    InnoDB: If you get repeated assertion failures or crashes, even
    InnoDB: immediately after the mysqld startup, there may be
    InnoDB: corruption in the InnoDB tablespace. Please refer to
    InnoDB: http://dev.mysql.com/doc/refman/5.5/en/forcing-innodb-recovery.html
    InnoDB: about forcing recovery.
    09:44:32 UTC - mysqld got signal 6 ;
    
    A restart returns:

    Code:
    [/var/lib/mysql]# service mysql restart
    MySQL server PID file could not be found!                  [FAILED]
    Starting MySQL.............................................[FAILED]...The server quit without updating PID file (/var/lib/mysql/hostname.pid).
    
    Would anyone happen to have any idea what is happening here?

    Thanks in advance
     
  2. kernow

    kernow Well-Known Member

    Joined:
    Jul 23, 2004
    Messages:
    865
    Likes Received:
    9
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Check if the /tmp partition is full.
    check if /tmp actually has the mysql.sock file. If not create it with:
    touch /tmp/mysql.sock
    service mysqld restart
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  4. speckados

    speckados Well-Known Member

    Joined:
    May 21, 2003
    Messages:
    291
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Acequias :: Granada :: España
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    And after... not use Innodb on mode traditional... use innodb_file_per_table=1 (of course need, dump all and restore form dump after put innodb_file_per_table=1 on your my.cnf and restart mysql)

    Not best for performance, but quit several problem with Innodb crashes...
     
  5. sf.basilix

    sf.basilix Registered

    Joined:
    Feb 16, 2015
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    MySQL uses a PID file to know what the process ID is, when running on your system. According to your error, it cannot locate the file, which should be /var/lib/mysql/hostname.pid. If that file doesn't exist, create it by issuing the following command (provided the directory exists too):

    # touch /var/lib/mysql/hostname.pid

    check the permissions and ownership of the file is correct as well (use chmod or chown)

    If all of these exist and MySQL still cannot come online, then you likely have a corrupted database and may need to reinstall from backups.
     
Loading...

Share This Page