Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Feb 2011
    Location
    Switzerland
    Posts
    2

    Default mySQL restarts automatically, every 2sec. error db

    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. #2
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    6,305
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: mySQL restarts automatically, every 2sec. error db

    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.
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Forums Technical Analyst, cPanel Tech Support

    Submit a ticket | Check an existing ticket

  3. #3
    Registered User
    Join Date
    Feb 2011
    Location
    Switzerland
    Posts
    2

    Default Re: mySQL restarts automatically, every 2sec. error db

    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


    Quote Originally Posted by cPanelTristan View Post
    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.

  4. #4
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    6,305
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: mySQL restarts automatically, every 2sec. error db

    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.
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Forums Technical Analyst, cPanel Tech Support

    Submit a ticket | Check an existing ticket

Similar Threads & Tags
Similar threads

  1. mysql shows fail, yet restarts ok?
    By Secret Agent in forum cPanel and WHM Discussions
    Replies: 16
    Last Post: 02-24-2008, 10:44 PM
  2. Every day at 4.03am MySQL restarts
    By BahBah in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 02-22-2008, 03:14 AM
  3. MySQL restarts every few seconds
    By 1EightT in forum cPanel and WHM Discussions
    Replies: 7
    Last Post: 01-28-2007, 03:18 PM
  4. exim restarts automatically
    By king620 in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 06-24-2005, 05:26 AM
  5. cppop restarts automatically every 10 mins.
    By fastdns in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 03-05-2005, 02:56 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube