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 restarts automatically, every 2sec. error db

Discussion in 'Database Discussion' started by Icode, Feb 15, 2011.

  1. Icode

    Icode Registered

    Joined:
    Feb 15, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    51
    Location:
    Switzerland
    Hi,

    I dont know whats happening with my mysql under my whm server.

    I see on my website and client websites, every 10seconds if i refresh the website, i see an error: Cannot connect to database, it restarts automatically with error, and if i click on: MySQL Process List i can't see any process on the list, the page its white, its not displaying the list of processess?

    WHat should i do to fix this error?

    Thanks
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,608
    Likes Received:
    32
    Trophy Points:
    238
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Hello lcode,

    You would want to check the MySQL error log:

    Code:
    ls -lah /var/lib/mysql/*.err
    The above command will get you the name of the error log, then you would want to tail it for any recent errors:

    Code:
    tail -f /var/lib/mysql/hostname.err
    Where hostname.err is the name of the error log for MySQL that you would have previously obtained.

    Thanks.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Icode

    Icode Registered

    Joined:
    Feb 15, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    51
    Location:
    Switzerland
    I have the same error, restarts automatically, dberror, what can i do?
    I just tried checking the logfiles, and i dont see any error, he shutdown the service, and start again normally.

    Look here is the code:
    100311 20:45:32 [Note] /usr/sbin/mysqld: ready for connections.
    Version: '5.0.89-community' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Edition (GPL)
    100314 18:59:55 [Note] /usr/sbin/mysqld: Normal shutdown

    100314 18:59:55 InnoDB: Starting shutdown...
    100314 18:59:56 InnoDB: Shutdown completed; log sequence number 0 71209
    100314 18:59:56 [Note] /usr/sbin/mysqld: Shutdown complete

    100314 18:59:56 mysqld ended


     
  4. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,608
    Likes Received:
    32
    Trophy Points:
    238
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Do you have anything on the machine that is a process killer like sim or prm, or do you run CSF with LFD?

    Code:
    whereis sim
    whereis prm
    whereis csf
    If so, please shut any of those down to see if one might be killing off MySQL.

    Next, what do you have in /etc/my.cnf file?

    Code:
    cat /etc/my.cnf
    Finally, do you have any crons running frequently that could be doing something?

    Code:
    tail -f /var/log/cron
    Thanks.
     
    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