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 Can't restart

Discussion in 'Database Discussions' started by ultimator, Dec 9, 2013.

  1. ultimator

    ultimator Registered

    Joined:
    Mar 4, 2009
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    I have tried to restart mysql but it fails continually, i have tried rebooting yet the situation remains the same, what can i do, i get this message from cpanel

    thanks
     
  2. mtindor

    mtindor Well-Known Member

    Joined:
    Sep 14, 2004
    Messages:
    1,279
    Likes Received:
    36
    Trophy Points:
    48
    Location:
    inside a catfish
    cPanel Access Level:
    Root Administrator
    You will probably want to check /var/lib/mysql/<server_hostname>.err . At the end of that file you should see relevant errors logged to help you determine what is going on.

    If you're servers name is zeus.someservername.ext, then:

    tail -n 100 /var/lib/mysql/zeus.someservername.ext.err

    An easy way to tell the name of the error log is just to do this: ls -alt /var/lib/mysql|grep '\.err'

    Mike

    - - - Updated - - -

    Based upon your previous post here:

    http://forums.cpanel.net/f5/partition-full-378561.html

    ... I'm betting that the reason your MySQL will not start is because you don't have any free space on / .

    Mike
     
  3. ultimator

    ultimator Registered

    Joined:
    Mar 4, 2009
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    thanks, i discovered that the <hostname>.err file in /var/lib/mysql is over 1.5Gb in size, i deleted it and restarted mysql and its working now. thanks
     
  4. mtindor

    mtindor Well-Known Member

    Joined:
    Sep 14, 2004
    Messages:
    1,279
    Likes Received:
    36
    Trophy Points:
    48
    Location:
    inside a catfish
    cPanel Access Level:
    Root Administrator
    I'm glad that helped you. Although, you perhaps should have checked into what errors were logged, as well as how recently they were logged, before removing that file. There is a reason err logs fill up. Mine do not. As a general rule, the only time I see anything in the err log is when I restart MySQL or update it.

    And, 1.5 GB free isn't much . You might want to consider going through your system and seeing if you can find other possible files to delete / archive. Depending upon your system activity, you might have large logs in /var/log, /usr/local/cpanel/logs, /var/log/cpanel/logs, /usr/local/apache/logs, etc. If there are some signfiicantly large that you can remove, you might want to consider compressing them and keeping them for a period of time, and of course after you compress them you can delete the original ones and restart the services that produce those logs so that they continue to log properly.

    Mike
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,723
    Likes Received:
    660
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Yes, it sounds like the /var partition on your system may have been full. Removing the log file opened up some space and allowed MySQL to restart. Going forward, you may want to review the following document to get a better idea of the space used and available to your /var partition:

    cPanel - Manage HD Space

    Thank you.
     
Loading...

Share This Page