Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Mysql keeps shutting down

Discussion in 'Database Discussion' started by gadalf, Apr 19, 2015.

  1. gadalf

    gadalf Well-Known Member

    Joined:
    Jun 8, 2014
    Messages:
    50
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    I am getting :
    Database connection error (2): Could not connect to MySQL.
    Times after time. So I need to restart MySql time after time.
    How to investigate which website is causing the problem?
     
  2. ravijas

    ravijas Member

    Joined:
    Jul 24, 2014
    Messages:
    13
    Likes Received:
    1
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    Hi,

    Please check /var/lib/mysql/hostname.com.err error logs to get more information about it.

    Thanks,

    RaviJas
     
    gadalf likes this.
  3. gadalf

    gadalf Well-Known Member

    Joined:
    Jun 8, 2014
    Messages:
    50
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Thank you very much,
    Here is a screenshot of what i got. I am trying to understand it but ...
     

    Attached Files:

    • stat.jpg
      stat.jpg
      File size:
      135.7 KB
      Views:
      13
  4. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,888
    Likes Received:
    90
    Trophy Points:
    78
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,214
    Likes Received:
    1,936
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    What's the size of your eximstats database? EX:

    Code:
    du -sh /var/lib/mysql/eximstats
    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. gadalf

    gadalf Well-Known Member

    Joined:
    Jun 8, 2014
    Messages:
    50
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    I am starting to have again this error:
    exim stats database size 114 M
     
  7. sahostking

    sahostking Well-Known Member

    Joined:
    May 15, 2012
    Messages:
    330
    Likes Received:
    3
    Trophy Points:
    68
    Location:
    Cape Town, South Africa
    cPanel Access Level:
    Root Administrator
    Also enable mysql.slow log in my.cnf to catch those slow mysql queries from websites.

    Also try running mysqladmin processlist a random times to see - you can even create a php script to check every minute and to inform you of this occurring at the exact time.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice