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 Upgrade on WHM (Mysql 5.1 to 5.5)

Discussion in 'Database Discussions' started by heusdens, Oct 1, 2013.

  1. heusdens

    heusdens Active Member

    Joined:
    Oct 1, 2013
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Currently on Centos 6.4 VPS, Apache 2.2.25, PHP 5.3.27. WHM 11.38.2 (Build 7).

    Last night I decided to upgrade Mysql from version 5.1 to 5.5 using the Mysql Upgrade under Software section in WHM.

    I selected the unattended upgrade and rebuild php and apache. After doing this all sites showed Internal Server Error 500.

    MySQL is not running and I can't get it to start either via WHM of SSH.

    PhpMyAdmin shows:
    Code:
    #2002 - Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
    The server is not responding (or the local server's socket is not correctly configured).
    I also get these notifications:

    Code:
    Problems were detected with cPanel-provided files which are RPM controlled. If you did not make these changes intentionally, you can correct them by running:
    
    /usr/local/cpanel/scripts/check_cpanel_rpms --fix
    
    The following RPMs are missing from your system: MySQL55-server.5.5.32-1.cp1136
    Running /usr/local/cpanel/scripts/check_cpanel_rpms --fix did not yield any results.

    Any help will be appreciated.
     
  2. heusdens

    heusdens Active Member

    Joined:
    Oct 1, 2013
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi

    Just a bit more info:

     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

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

    Please try reinstalling the MySQL RPMs with the following commands:

    Code:
    /scripts/update_local_rpm_versions --edit target_settings.MySQL55 uninstalled
    /scripts/check_cpanel_rpms --fix
    /scripts/update_local_rpm_versions --edit target_settings.MySQL55 installed
    /scripts/check_cpanel_rpms --fix
    Thank you.
     
  4. heusdens

    heusdens Active Member

    Joined:
    Oct 1, 2013
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi

    Thank you I've run the commands and received the following output:

    Code:
    root@server1 [~]# /scripts/update_local_rpm_versions --edit target_settings.MySQ                                                                                                                                L55 uninstalled
    root@server1 [~]# /scripts/check_cpanel_rpms --fix
    [20131001.160154]
    [20131001.160154]   The following RPMs are unneeded on your system and should be                                                                                                                                 uninstalled:
    [20131001.160154]   MySQL55-client.5.5.32-1.cp1136
    [20131001.160154]   MySQL55-devel.5.5.32-1.cp1136
    [20131001.160154]   MySQL55-shared.5.5.32-1.cp1136
    [20131001.160154]   MySQL55-test.5.5.32-1.cp1136
    [20131001.160242]   Removing 0 broken rpms:
    [20131001.160242]   rpm: no packages given for erase
    [20131001.160243]   No new RPMS needed for install
    [20131001.160244]   Uninstalling unneeded rpms: MySQL55-test MySQL55-client MySQL55-share                                                                                                                       root@server1 [~]# /scripts/update_local_rpm_versions --edit target_settings.MySQL55 installed
    root@server1 [~]# /scripts/check_cpanel_rpms --fix
    [20131001.160342]
    [20131001.160342]   Problems were detected with cPanel-provided files which are RPM controlled.
    [20131001.160342]   If you did not make these changes intentionally, you can correct them by running:
    [20131001.160342]
    [20131001.160342]   > /usr/local/cpanel/scripts/check_cpanel_rpms --fix
    [20131001.160342]   The following RPMs are missing from your system:
    [20131001.160342]   MySQL55-client.5.5.32-1.cp1136
    [20131001.160342]   MySQL55-devel.5.5.32-1.cp1136
    [20131001.160342]   MySQL55-server.5.5.32-1.cp1136
    [20131001.160342]   MySQL55-shared.5.5.32-1.cp1136
    [20131001.160342]   MySQL55-test.5.5.32-1.cp1136
    [20131001.160351]   Removing 0 broken rpms:
    [20131001.160351]   rpm: no packages given for erase
    [20131001.160352]   Downloading [url]http://httpupdate.cpanel.net/RPM/11.36/centos/6/x86_64/rpm.md5[/url]
    [20131001.160353]   MySQL55-client-5.5.32-1.cp1136.x86_64.rpm already downloaded
    [20131001.160353]   MySQL55-devel-5.5.32-1.cp1136.x86_64.rpm already downloaded
    [20131001.160354]   MySQL55-server-5.5.32-1.cp1136.x86_64.rpm already downloaded
    [20131001.160354]   MySQL55-shared-5.5.32-1.cp1136.x86_64.rpm already downloaded
    [20131001.160355]   MySQL55-test-5.5.32-1.cp1136.x86_64.rpm already downloaded
    [20131001.160356]   Hooks system enabled
    [20131001.160356]   Checking for and running RPM::Versions 'pre' hooks for any RPMs about to be installed
    warn [check_cpanel_rpms] program "/scripts/premysqlup" is not executable
    [20131001.160356]   All required 'pre' hooks have been run
    [20131001.160356]   No RPMS need to be uninstalled
    [20131001.160356]   Installing new rpms: MySQL55-client-5.5.32-1.cp1136.x86_64.rpm MySQL55-devel-5.5.32-1.cp1136.x                                                                                              86_64.rpm MySQL55-server-5.5.32-1.cp1136.x86_64.rpm MySQL55-shared-5.5.32-1.cp1136.x86_64.rpm MySQL55-test-5.5.32-                                                                                              1.cp1136.x86_64.rpm
    [20131001.160356]   Preparing packages for installation...
    [20131001.160357]   MySQL55-client-5.5.32-1.cp1136
    [20131001.160358]   You have more than one PID file:
    [20131001.160358]   -rw-rw----. 1 mysql mysql 5 Sep  9 08:12 /var/lib/mysql/DJFG001.pid
    [20131001.160358]   -rw-rw----. 1 mysql mysql 5 Sep 10 04:11 /var/lib/mysql/server1.pid
    [20131001.160358]   Please check which one (if any) corresponds to a running server
    [20131001.160358]   and delete all others before repeating the MySQL upgrade.
    [20131001.160358]   error: %pre(MySQL55-server-5.5.32-1.cp1136.x86_64) scriptlet failed, exit status 1
    [20131001.160358]   error:   install: %pre scriptlet failed (2), skipping MySQL55-server-5.5.32-1.cp1136
    [20131001.160358]   MySQL55-test-5.5.32-1.cp1136
    [20131001.160411]   MySQL55-shared-5.5.32-1.cp1136
    [20131001.160412]   MySQL55-devel-5.5.32-1.cp1136
    [20131001.160412] W Error Code: 5
    [20131001.160412] E The following possible errors were detected while installing RPMs:
    [20131001.160412] E %pre(MySQL55-server-5.5.32-1.cp1136.x86_64) scriptlet failed, exit status 1 install
    [20131001.160412]   The Administrator will be notified to review this output when this script completes
    [20131001.160412]   Checking for and running RPM::Versions 'post' hooks for any RPMs just installed
    warn [check_cpanel_rpms] program "/scripts/postmysqlinstall" is not executable
    warn [check_cpanel_rpms] program "/scripts/postmysqlup" is not executable
    [20131001.160412]   All required 'post' hooks have been run
    Does this have to do with PIDs files?
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

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

    The following error is relevant here:

    Delete those PID files in /var/lib/mysql if you do not have any MySQL processes running on your system. Then, attempt to reinstall MySQL again via:

    Code:
    /scripts/check_cpanel_rpms --fix
    Thank you.
     
  6. heusdens

    heusdens Active Member

    Joined:
    Oct 1, 2013
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    hi

    Thank you I deleted the PID files and executed the command and this is what came out:

    Code:
    root@server1 [~]# /scripts/check_cpanel_rpms --fix
    [20131001.174858]
    [20131001.174858]   Problems were detected with cPanel-provided files which are                                                                                  RPM controlled.
    [20131001.174858]   If you did not make these changes intentionally, you can cor                                                                                 rect them by running:
    [20131001.174858]
    [20131001.174858]   > /usr/local/cpanel/scripts/check_cpanel_rpms --fix
    [20131001.174858]   The following RPMs are missing from your system:
    [20131001.174858]   MySQL55-server.5.5.32-1.cp1136
    [20131001.174908]   Removing 0 broken rpms:
    [20131001.174908]   rpm: no packages given for erase
    [20131001.174910]   Downloading [url]http://httpupdate.cpanel.net/RPM/11.36/centos/6/x86_64/rpm.md5[/url]
    [20131001.174911]   MySQL55-server-5.5.32-1.cp1136.x86_64.rpm already downloaded
    [20131001.174911]   Hooks system enabled
    [20131001.174911]   Checking for and running RPM::Versions 'pre' hooks for any RPMs about to be installed
    warn [check_cpanel_rpms] program "/scripts/premysqlup" is not executable
    [20131001.174911]   All required 'pre' hooks have been run
    [20131001.174911]   No RPMS need to be uninstalled
    [20131001.174911]   Installing new rpms: MySQL55-server-5.5.32-1.cp1136.x86_64.rpm
    [20131001.174912]   Preparing packages for installation...
    [20131001.174912]   MySQL55-server-5.5.32-1.cp1136
    [20131001.174915]   131001 17:49:15 [Warning] The syntax '--log-slow-queries' is deprecated and will be removed in a future release. Please use '--slow-query-log'/'--slow-query-log-file' instead.
    [20131001.174916]   ERROR: 1136  Column count doesn't match value count at row 1
    [20131001.174916]   131001 17:49:16 [ERROR] Aborting
    [20131001.174916]
    [20131001.174916]   131001 17:49:16 [Note] /usr/sbin/mysqld: Shutdown complete
    [20131001.174916]
    [20131001.174916]
    [20131001.174916]   Installation of system tables failed!  Examine the logs in
    [20131001.174916]   /var/lib/mysql for more information.
    [20131001.174916]
    [20131001.174916]   You can try to start the mysqld daemon with:
    [20131001.174916]
    [20131001.174916]       shell> /usr/sbin/mysqld --skip-grant &
    [20131001.174916]
    [20131001.174916]   and use the command line tool /usr/bin/mysql
    [20131001.174916]   to connect to the mysql database and look at the grant tables:
    [20131001.174916]
    [20131001.174916]       shell> /usr/bin/mysql -u root mysql
    [20131001.174916]       mysql> show tables
    [20131001.174916]
    [20131001.174916]   Try 'mysqld --help' if you have problems with paths.  Using --log
    [20131001.174916]   gives you a log in /var/lib/mysql that may be helpful.
    [20131001.174916]
    [20131001.174916]   Please consult the MySQL manual section
    [20131001.174916]   'Problems running mysql_install_db', and the manual section that
    [20131001.174916]   describes problems on your OS.  Another information source are the
    [20131001.174916]   MySQL email archives available at [url=http://lists.mysql.com/]MySQL Lists[/url].
    [20131001.174916]
    [20131001.174916]   Please check all of the above before mailing us!  And remember, if
    [20131001.174916]   you do mail us, you MUST use the /usr/bin/mysqlbug script!
    [20131001.174916]
    [20131001.174920]   Looking for 'mysql' as: /usr/bin/mysql
    [20131001.174920]   Looking for 'mysqlcheck' as: /usr/bin/mysqlcheck
    [20131001.174920]   FATAL ERROR: Upgrade failed
    [20131001.174940]   /usr/bin/mysqladmin: connect to server at 'localhost' failed
    [20131001.174940]   error: 'Access denied for user 'root'@'localhost' (using password: YES)'
    [20131001.174940]   Starting MySQL[  OK  ]
    [20131001.174940] E The following possible errors were detected while installing RPMs:
    [20131001.174940] E 'Access denied for user 'root'@'localhost' (using password
    [20131001.174940]   The Administrator will be notified to review this output when this script completes
    [20131001.174940]   Checking for and running RPM::Versions 'post' hooks for any RPMs just installed
    warn [check_cpanel_rpms] program "/scripts/postmysqlinstall" is not executable
    warn [check_cpanel_rpms] program "/scripts/postmysqlup" is not executable
    [20131001.174940]   All required 'post' hooks have been run
    [/QUOTE]
    
    Mysql is now running in Services 
    [QUOTE]mysql	5.5.32-cll	up[/QUOTE]
    My websites are now up and running.  This is good news for me.
    
    Thank you very much for your help I really appreciate it and I've learnt a lot from this so far.
    
    Just in terms of the output above it appears some issues were picked up, what would I need to address there? e.g. 
    [QUOTE][20131001.174940]   /usr/bin/mysqladmin: connect to server at 'localhost' failed
    [20131001.174940]   error: 'Access denied for user 'root'@'localhost' (using password: YES)'
     
  7. heusdens

    heusdens Active Member

    Joined:
    Oct 1, 2013
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Apologies I didn't quote the post correctly.

    Mysql is now running in Services

    My websites are now up and running. This is good news for me.

    Thank you very much for your help I really appreciate it and I've learnt a lot from this so far.

    Just in terms of the output above it appears some issues were picked up, what would I need to address there? e.g.
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    I recommend running the following command while logged in as "root":

    Code:
    mysql_upgrade
    If you continue to see "Access Denied" errors, check to ensure your MySQL root password is setup correctly. You can use the following option for this:

    "WHM Home » SQL Services » MySQL Root Password"

    Thank you.
     
  9. heusdens

    heusdens Active Member

    Joined:
    Oct 1, 2013
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi

    Thanks I ran mysql_upgrade and all is in order. No Access Denied errors. MySQL root password is set up correctly.

    Thank you again for all your help.
     
Loading...

Share This Page