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.

Error while connecting to MySQL

Discussion in 'Database Discussions' started by bepad, Jun 18, 2014.

  1. bepad

    bepad Member

    Joined:
    Jun 18, 2014
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi

    Today I updated the Cpanel, then the error is given by the accounts mysql management, please guide

    Error while connecting to MySQL: Cpanel::DBI::Mysql connect('','root',...) failed: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) at /usr/local/cpanel/Cpanel/Mysql.pm line 140 Error while connecting to MySQL: Cpanel::DBI::Mysql connect('','root',...) failed: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) at /usr/local/cpanel/Cpanel/Mysql.pm line 140 ...caught

    Error is not connected Dytabs sites

    Thank
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    652
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  3. bepad

    bepad Member

    Joined:
    Jun 18, 2014
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi

    Not any errors on the site and this is an error, please advise the command to
    service mysql restart
    Shutting down MySQL........................ [ OK ]
    Starting MySQL.................................... [ OK ]


    Thank
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    652
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Please open a support ticket so we can take a closer look. You can post the ticket number here so we can update this thread with the outcome.

    Thank you.
     
  5. bepad

    bepad Member

    Joined:
    Jun 18, 2014
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator

    hi

    Mysql problem after update to 5.5 before it is ready, how do I downgrade to Mysql 5.1

    Why does the following command to downgrade?
    /scripts/mysqlup --force
    -bash: /scripts/mysqlup: No such file or directory
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

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

    Per the "MySQL Upgrade" interface in WHM:

    Please note that MySQL upgrades are ONE WAY. Downgrades of MySQL are unsafe and unsupported.

    What specific issues are you experiencing? Were you able to open a support ticket?

    Thank you.
     
  7. bepad

    bepad Member

    Joined:
    Jun 18, 2014
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator

    Hi
    mysql version upgraded to 5.6.17 will fix the problem but this problem can be solved almost after every 12 hours.And the attempt to upgrade and reset problem is solved
    Please advise why it is interrupted once every 12 hours.
    Thank
    This log is normally performed mysql log
    ---------------------------------
    2014-06-21 17:32:03 1026 [Note] Plugin 'FEDERATED' is disabled.
    2014-06-21 17:32:03 1026 [Note] InnoDB: Using atomics to ref count buffer pool pages
    2014-06-21 17:32:03 1026 [Note] InnoDB: The InnoDB memory heap is disabled
    2014-06-21 17:32:03 1026 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
    2014-06-21 17:32:03 1026 [Note] InnoDB: Compressed tables use zlib 1.2.3
    2014-06-21 17:32:03 1026 [Note] InnoDB: Using Linux native AIO
    2014-06-21 17:32:03 1026 [Note] InnoDB: Using CPU crc32 instructions
    2014-06-21 17:32:03 1026 [Note] InnoDB: Initializing buffer pool, size = 128.0M
    2014-06-21 17:32:03 1026 [Note] InnoDB: Completed initialization of buffer pool
    2014-06-21 17:32:04 1026 [Note] InnoDB: Highest supported file format is Barracuda.
    2014-06-21 17:32:18 1026 [Note] InnoDB: 128 rollback segment(s) are active.
    2014-06-21 17:32:18 1026 [Note] InnoDB: Waiting for purge to start
    2014-06-21 17:32:18 1026 [Note] InnoDB: 5.6.17 started; log sequence number 23853548951
    2014-06-21 17:32:18 1026 [Note] Server hostname (bind-address): '*'; port: 3306
    2014-06-21 17:32:18 1026 [Note] IPv6 is available.
    2014-06-21 17:32:18 1026 [Note] - '::' resolves to '::';
    2014-06-21 17:32:18 1026 [Note] Server socket created on IP: '::'.
    2014-06-21 17:32:22 1026 [Note] Event Scheduler: Loaded 0 events
    2014-06-21 17:32:22 1026 [Note] /usr/sbin/mysqld: ready for connections.
    Version: '5.6.17' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server (GPL)
    ----------------------------------------------------------------------------
    /etc/my.cnf

    [mysqld]
    max_allowed_packet=268435456
    innodb_file_per_table=1
    default-storage-engine=MyISAM
    open_files_limit=50000

    This log is normally performed
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    652
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    I don't see any problems or error messages in the output you provided. Could you elaborate on the specific issue you are experiencing? Do you mean that MySQL restarts on it's own every 12 hours? Is it happening in exact 12-hour intervals?

    Thank you.
     
  9. bepad

    bepad Member

    Joined:
    Jun 18, 2014
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi
    Yes exactly once every 12 hours mysql error occurs exactly once every 12 hours.
    Also during the upgrade mysql 5.6, the following warning is given:
    The update could not reach the MySQL server to check for the presence of pre-4.1-style MySQL passwords. This issue could also hinder mysql_upgrade's ability to run, which could potentially leave MySQL in an unusable state if you proceed

    In general, the error after every 12 hours we will once again raise the problem to be solved in exactly 12 hours:mad:

    Thank
     
  10. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    652
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    I don't see anything in the log output to indicate why MySQL would restart every 12 hours. It's possible you have a cron job configured that is triggering the restart, but it's difficult to know for sure. I suggest opening a support ticket using the link in my signature so we can take a closer look. You can post the ticket number here so we can update this thread with the outcome.

    Thank you.
     
  11. bepad

    bepad Member

    Joined:
    Jun 18, 2014
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi

    The problem you are related to mod Security?
    Why is this message when the upgrade mysql 5.6.17 is the problem?
    The update could not reach the MySQL server to check for the presence of pre-4.1-style MySQL passwords. This issue could also hinder mysql_upgrade's ability to run, which could potentially leave MySQL in an unusable state if you proceed
     
  12. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    652
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  13. simonas

    simonas Well-Known Member

    Joined:
    Apr 21, 2013
    Messages:
    141
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Lithuania
    cPanel Access Level:
    Root Administrator
  14. bepad

    bepad Member

    Joined:
    Jun 18, 2014
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
  15. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    652
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  16. bepad

    bepad Member

    Joined:
    Jun 18, 2014
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi
    The problem is with the following command:
    ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock
    But after the first 12 hours is required to run this command, you must do something that does not happen again this problem after 12 hours

    Thank...
     
  17. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    652
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page