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 issues after Upgrade to 5.6 to allow CPanel

Discussion in 'General Discussion' started by squadx, Aug 10, 2014.

  1. squadx

    squadx Active Member

    Joined:
    Jan 26, 2012
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    [RESOLVED] Mysql issues after Upgrade to 5.6 to allow CPanel

    I got a message I needed Mysql 5.5 or higher to allow CPANEL upgrade to come through, but after doing so MYSQL will not start at all.

    Code:
    root@server1 [/var/lib/mysql]# /usr/local/cpanel/scripts/update_db_cache
    warn [update_db_cache] 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/MysqlUtils/Connect.pm line 136
    
    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/MysqlUtils/Connect.pm line 136
    
    I've seen people reference things you could modify possibly in /etc/my.cnf but this is all I have in mine

    Code:
    [mysqld]
    max_connections=500
    local-infile=0
    open_files_limit=8576
    slow_query_log=1
    slow_query_log_file
    innodb_file_per_table=1
    default-storage-engine=MyISAM
    max_allowed_packet=268435456
    
    and the /root/.my.cnf only has a [client] with the user and pass.


    Yes I've tried the symlink
    I have also tried adjusting the mysql password, but it fails because mysql is not started or able to be started due to this error.

    I also don't even see that file it's looking for in the /tmp dir
     
    #1 squadx, Aug 10, 2014
    Last edited: Aug 10, 2014
  2. triantech

    triantech Well-Known Member

    Joined:
    Jul 1, 2014
    Messages:
    145
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Kochi, India, India
    cPanel Access Level:
    Root Administrator
    Hey,

    Looking at your my.cnf file, this line looks a bit weird

    slow_query_log_file

    Try commenting the line or specify the log_file path.

    If the above doesn't fix, please paste the o/p of :

    # tail -10 /var/lib/mysql/yourhostname.err ( <- replace with your hostname )
     
  3. squadx

    squadx Active Member

    Joined:
    Jan 26, 2012
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Life saver my brother...that commenting out seems to fix the issue.

    So I am aware why that may fixed...is that just an outdated or incorrect command?

    As soon as I commented it out, mysql started fine. (I did have to rebuild apache/php due to 500 Internal Server)

    But all is good now.
     
  4. triantech

    triantech Well-Known Member

    Joined:
    Jul 1, 2014
    Messages:
    145
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Kochi, India, India
    cPanel Access Level:
    Root Administrator
    Hey,

    Looks like the path to the log file has not come through to the configuration
    after the upgrade. It is neither an outdated or incorrect command. Its just incomplete :)

    Adding a path to the line as follows will also fix the issue ( as you have enabled slow_query_log ) :

    slow_query_log_file=/path-to-the-log-file.

    Hope it might help.
     
  5. squadx

    squadx Active Member

    Joined:
    Jan 26, 2012
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Ahh makes sense.

    Thanks again!
     
  6. triantech

    triantech Well-Known Member

    Joined:
    Jul 1, 2014
    Messages:
    145
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Kochi, India, India
    cPanel Access Level:
    Root Administrator
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

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

Share This Page