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.

cPanel showing msg - The MySQL server is currently offline.

Discussion in 'General Discussion' started by delfinparis, Jan 28, 2014.

  1. delfinparis

    delfinparis Member

    Joined:
    Jun 16, 2011
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    This is happening for all the accounts in WHM.

    MySQL server is definitely online and working.

    I've reset the MySQL password (this sometimes fixes it, apparently). I've rebuilt MySQL. Restarted the server. Manually stopped/started MySQL. Nothing is working.

    Again, all my sites are up and running fine.

    Any thoughts on how to troubleshoot this problem? Thanks!
     
  2. Sreejit

    Sreejit Member

    Joined:
    Apr 11, 2011
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    You should check the mysql logs /var/lib/mysql/hostname.err for the exact reason.
     
  3. delfinparis

    delfinparis Member

    Joined:
    Jun 16, 2011
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    Thanks - here's what the .err file says...

    Code:
    100605 20:34:08  mysqld started
    InnoDB: The first specified data file ./ibdata1 did not exist:
    InnoDB: a new database to be created!
    100605 20:34:08  InnoDB: Setting file ./ibdata1 size to 10 MB
    InnoDB: Database physically writes the file full: wait...
    100605 20:34:09  InnoDB: Log file ./ib_logfile0 did not exist: new to be created
    InnoDB: Setting log file ./ib_logfile0 size to 5 MB
    InnoDB: Database physically writes the file full: wait...
    100605 20:34:09  InnoDB: Log file ./ib_logfile1 did not exist: new to be created
    InnoDB: Setting log file ./ib_logfile1 size to 5 MB
    InnoDB: Database physically writes the file full: wait...
    InnoDB: Doublewrite buffer not found: creating new
    InnoDB: Doublewrite buffer created
    InnoDB: Creating foreign key constraint system tables
    InnoDB: Foreign key constraint system tables created
    100605 20:34:09  InnoDB: Started; log sequence number 0 0
    100605 20:34:09 [Note] /usr/sbin/mysqld: ready for connections.
    Version: '5.0.90-community'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Edition (GPL)
    100605 20:34:13 [Note] /usr/sbin/mysqld: Normal shutdown
    
    100605 20:34:13  InnoDB: Starting shutdown...
    100605 20:34:13  InnoDB: Shutdown completed; log sequence number 0 43655
    100605 20:34:13 [Note] /usr/sbin/mysqld: Shutdown complete
    
    100605 20:34:13  mysqld ended
    
    100605 20:34:14  mysqld started
    100605 20:34:14  InnoDB: Started; log sequence number 0 43655
    100605 20:34:14 [Note] /usr/sbin/mysqld: ready for connections.
    Version: '5.0.90-community'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Edition (GPL)
    100605 20:46:07 [Note] /usr/sbin/mysqld: Normal shutdown
    
    100605 20:46:07  InnoDB: Starting shutdown...
    100605 20:46:08  InnoDB: Shutdown completed; log sequence number 0 43655
    100605 20:46:08 [Note] /usr/sbin/mysqld: Shutdown complete
    
    100605 20:46:08  mysqld ended
    
    100605 20:46:08  mysqld started
    100605 20:46:08  InnoDB: Started; log sequence number 0 43655
    100605 20:46:08 [Note] /usr/sbin/mysqld: ready for connections.
    Version: '5.0.90-community'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Edition (GPL)
    100605 20:46:12 [Note] /usr/sbin/mysqld: Normal shutdown
    
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

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

    Please check the cPanel error log (/usr/local/cpanel/logs/error_log) when you notice this error and let us know the output.

    Thank you.
     
  5. delfinparis

    delfinparis Member

    Joined:
    Jun 16, 2011
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    Here's the entirety of the error_log - it looks like old errors from 2010, though.

    Code:
    [2010-06-05 20:10:21 -0700] info [realadduser] No password specified for cpanel
    [2010-06-05 20:10:21 -0700] info [realadduser] User cpanel added
    [2010-06-05 20:10:21 -0700] info [realadduser] No password specified for cpanelhorde
    [2010-06-05 20:10:21 -0700] info [realadduser] User cpanelhorde added
    [2010-06-05 20:10:21 -0700] info [realadduser] No password specified for cpanelphpmyadmin
    [2010-06-05 20:10:21 -0700] info [realadduser] User cpanelphpmyadmin added
    [2010-06-05 20:10:21 -0700] info [realadduser] No password specified for cpanelphppgadmin
    [2010-06-05 20:10:21 -0700] info [realadduser] User cpanelphppgadmin added
    [2010-06-05 20:10:21 -0700] info [realadduser] No password specified for cpanelroundcube
    [2010-06-05 20:10:22 -0700] info [realadduser] User cpanelroundcube added
    [2010-06-05 20:11:07 -0700] info [restartsrv_named] BSD::Resource not available.  Resource Limits not adjusted
    [2010-06-05 20:11:07 -0700] info [restartsrv_named] BSD::Resource not available.  Resource Limits not adjusted
    [2010-06-05 20:11:07 -0700] info [restartsrv_named] BSD::Resource not available.  Resource Limits not adjusted
    [2010-06-05 20:11:13 -0700] info [mailperm] BSD::Resource not available.  Resource Limits not adjusted
    [2010-06-05 20:11:27 -0700] warn [vps_optimizer] Unable to determine MySQL data directory from mysqladmin variables. at /scripts/cPScript/MysqlUtils.pm line 75
            cPScript::MysqlUtils::getmysqldir() called at /scripts/vps_optimizer line 70
    [2010-06-05 20:11:27 -0700] warn [vps_optimizer] Failed to determine MySQL data directory. Please check the MySQL installation. at /scripts/cPScript/MysqlUtils.pm line 83
            cPScript::MysqlUtils::getmysqldir() called at /scripts/vps_optimizer line 70
    [2010-06-05 20:33:06 -0700] info [cPScript::Config::LoadWwwAcctConf] Creating default /etc/wwwacct.conf at /scripts/cPScript/Config/LoadWwwAcctConf.pm line 84
            cPScript::Config::LoadWwwAcctConf::loadwwwacctconf() called at /scripts/cPScript/HttpUtils/Conf.pm line 60
    
     
  6. cPanelPeter

    cPanelPeter Technical Analyst III
    Staff Member

    Joined:
    Sep 23, 2013
    Messages:
    569
    Likes Received:
    15
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    Please provide the output of /etc/my.cnf

    # cat /etc/my.cnf

    Thank you
     
  7. quietFinn

    quietFinn Well-Known Member

    Joined:
    Feb 4, 2006
    Messages:
    998
    Likes Received:
    10
    Trophy Points:
    18
    Location:
    Finland
    cPanel Access Level:
    Root Administrator

    Your mySQL error log is from the same date, June 5. 2010.

    Is your server's date & time correct?
     
  8. delfinparis

    delfinparis Member

    Joined:
    Jun 16, 2011
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    Here you go!

    Code:
    [mysqld]
    open_files_limit=22536
    character-set-server=utf8
    innodb_file_per_table=1
    default-storage-engine=MyISAM
    [client]
    character-set-server=utf8
    
    - - - Updated - - -

     
  9. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    653
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    How are you viewing your log files? Are you using a command such as "tail"? The date in your log files snippets do not match your server's date/time.

    Thank you.
     
  10. delfinparis

    delfinparis Member

    Joined:
    Jun 16, 2011
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    Hi Michael,

    No I was using VIM. Oops!

    Here is the error_log file using "tail"

    Code:
    main::domysql('initcache', ARRAY(0xae1f470)) called at cpanel line 1827
            eval {...} called at cpanel line 1827
            main::real_exectag('<cpanel Mysql="initcache()">') called at cpanel line 4094
            main::dotag_finished_headers(0) called at cpanel line 3914
            main::cpanel_parseblock('<cpanel setvar="headerimg=../images/topmysql.gif">\x0A<cpanel setvar="dprefix=../">\x0A<cpanel setvar="headerinclude=sql/index_head.html">\x0A<cpanel Branding="include(stdheader.html)">\x0A<cpanel Mysql="initcache()">\x0A\x09<cpanelif $FORM{\'itemsperpage\'}>\x0A\x09    <cpanel setvar="itemsperpage=$FORM{\'itemsperpage\'}">\x0A\x09</cpanelif>\x0A\x09<cpanelif !$FORM{\'itemsperpage\'} || !$CPVAR{\'itemsperpage\'}>\x0A\x09    <cpanel setvar="itemsperpage=10">\x0A\x09</cpanelif>\x0A\x0A\x0A<div class="body-content">\x09 \x0A\x0A<cpanelfeature !mysql>\x0A        <meta http-equiv="refresh" content="0;url=../index.html" />\x0A</cpanelfeature>\x0A\x0A<cpanelif !$mysqlrunning>\x0A   <p class="alert_box"><cpanel Locale="maketext(\'The MySQL server is currently [boolean,_1,online,offline].\',$mysqlrunning)"></p>\x0A</cpanelif>\x0A<cpanelif $CPERROR{\'mysql\'}>\x0A  <div class="error_details"><cpanel print="$CPERROR{\'mysql\'}"></div>\x0A</cpanelif>\x0A\x0A\x0A<cpanelfeature mysql>\x0A<cpanelif $mysqlrunning>\x0A<cpanel relinclude="sql/index_include.html">\x0A</cpanelif>\x0A</cpanelfeature>\x0A\x0A\x0A</div><!-- end body-content -->\x0A\x09\x0A<cpanel Branding="include(stdfooter.html)">\x0A') called at cpanel line 3828
            main::y(GLOB(0xab3c91c)) called at cpanel line 5183
            main::run_standard_mode() called at cpanel line 769
    [2014-01-30 11:15:40 -0600] warn [Mysql::initcache] Encountered error in Mysql::initcache: The mysql server is offline.
    
    /usr/bin/mysqladmin: unknown variable 'character-set-server=utf8'
    
     
  11. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    653
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Please remove the following line from the "Client" section of your /etc/my.cnf file and then restart MySQL:

    Code:
    character-set-server=utf8
    This is a server value under the "Client" section, so it's not valid.

    Thank you.
     
  12. delfinparis

    delfinparis Member

    Joined:
    Jun 16, 2011
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    You ROCK!

    That fixed it. Well done!
     
Loading...

Share This Page