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 keeps shutting down

Discussion in 'Database Discussions' 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,146
    Likes Received:
    34
    Trophy Points:
    48
    Location:
    India
    cPanel Access Level:
    Root Administrator
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  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:
    300
    Likes Received:
    1
    Trophy Points:
    18
    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.
     
Loading...

Share This Page