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.

Upgraded mysql via WHM after shell upgrade failed - mysql service won't start

Discussion in 'Database Discussions' started by yoHuge, Sep 24, 2013.

  1. yoHuge

    yoHuge Registered

    Joined:
    Jun 1, 2009
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    On CentOS 5.9 i686 running WHM 11.38, I was attempting to upgrade mysql from 5.0 to 5.5 using shell instead of WHM because I was told it was safer that way as it would keep the old mysql lib intact and my sites would have no downtime. HA. The shell upgrade failed. So I attempted to upgrade using WHM mysql upgrade and that failed. Then I did an easyapache upgrade and then another mysql upgrade via WHM which finally showed it was a success. But then the mysql service wouldn't start and it produced the error message:

    Code:
    "Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)"
    The tail end of the MySQL error log shows this:

    Code:
     mysqld started
    130312  4:13:16  InnoDB: Started; log sequence number 0 2350314
    130312  4:13:16 [Note] /usr/sbin/mysqld: ready for connections.
    Version: '5.0.96-community'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Edition (GPL)
    130923 21:06:50 [Note] /usr/sbin/mysqld: Normal shutdown
    
    130923 21:06:50  InnoDB: Starting shutdown...
    130923 21:06:50  InnoDB: Shutdown completed; log sequence number 0 2794677
    130923 21:06:50 [Note] /usr/sbin/mysqld: Shutdown complete
    
    130923 21:06:50  mysqld ended
    In shell I got this:

    Code:
    # rpm -qa|grep -i mysql
    MySQL55-shared-5.5.32-1.cp1136
    MySQL55-devel-5.5.32-1.cp1136
    cpanel-mysql-libs-5.0.96-1.cp1136
    cpanel-mysql-5.0.96-1.cp1136
    cpanel-perl-514-MySQL-Diff-0.43-1.cp1136
    MySQL55-client-5.5.32-1.cp1136
    MySQL55-test-5.5.32-1.cp1136
    cpanel-perl-514-DBD-mysql-4.021-1.cp1136
    The output list shows that i'm missing the current version of mysql 5.5 server.

    I tried re-upgrading mysql from within WHM and it said success but the mysql won't start and it looks like it is not available.

    So it seems the old version of mysql 5.0 didn't uninstall correctly and it is conflicting with a partial install of the new mysql 5.5 version. ???

    So my question is, how do I completely uninstall the old mysql 5.0 from shell? Do I have to uninstall both mysql versions using rpm from shell to completely remove them, exit shell, and then use WHM to install mysql 5.5 again? I can't do a downgrade back to mysql 5.0 via WHM. Any help would be great! thanks.
     
  2. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,461
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    The 5.0 RPMs in your output, which contain cpanel in the RPM name, can be ignored. Those are used internally by cPanel & WHM, not by Apache.

    What is the output of /scripts/check_cpanel_rpms --fix?
     
  3. yoHuge

    yoHuge Registered

    Joined:
    Jun 1, 2009
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Ok, I had just done a remove package command from shell before I got the forum reply:

    Code:
    # rpm -e cpanel-mysql-5.0.96-1.cp1136
    because I thought that was conflicting, but it didn't change anything. The results of entering the command to check cpanel rpms is:

    Code:
    root@huge [/]# /scripts/check_cpanel_rpms
    [20130924.154603]
    [20130924.154603]   Problems were detected with cPanel-provided files which are RPM controlled.
    [20130924.154603]   If you did not make these changes intentionally, you can correct them by running:
    [20130924.154603]
    [20130924.154603]   > /usr/local/cpanel/scripts/check_cpanel_rpms --fix
    [20130924.154603]   The following RPMs are missing from your system:
    [20130924.154603]   MySQL55-server.5.5.32-1.cp1136
    [20130924.154603]   cpanel-mysql.5.0.96-1.cp1136
    Do you want to repair these RPMs?(y/n):
    y
    [20130924.154709]   Removing 0 broken rpms:
    [20130924.154709]   rpm: no packages given for erase
    [20130924.154717]   Downloading http://httpupdate.cpanel.net/RPM/11.36/centos/5/i386/rpm.md5
    [20130924.154718]   Downloading http://httpupdate.cpanel.net/RPM/11.36/centos/5/i386/cpanel-mysql-5.0.96-1.cp1136.i386.rpm
    [20130924.154719]   MySQL55-server-5.5.32-1.cp1136.i386.rpm already downloaded
    [20130924.154720]   Hooks system enabled
    [20130924.154720]   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
    [20130924.154720]   All required 'pre' hooks have been run
    [20130924.154722]   No RPMS need to be uninstalled
    [20130924.154722]   Installing new rpms: cpanel-mysql-5.0.96-1.cp1136.i386.rpm MySQL55-server-5.5.32-1.cp1136.i386.rpm
    [20130924.154722]   Preparing packages for installation...
    [20130924.154724]   cpanel-mysql-5.0.96-1.cp1136
    [20130924.154724]   You have more than one PID file:
    [20130924.154724]   -rw-rw---- 1 mysql mysql 5 Sep 18  2009 /var/lib/mysql/huge.pid
    [20130924.154724]   -rw-rw---- 1 mysql mysql 5 Mar 19  2009 /var/lib/mysql/mail.myservername.com.pid
    [20130924.154724]   -rw-rw---- 1 mysql mysql 5 Mar 19  2009 /var/lib/mysql/web2.justhost.com.pid
    [20130924.154724]   Please check which one (if any) corresponds to a running server
    [20130924.154724]   and delete all others before repeating the MySQL upgrade.
    [20130924.154724]   error: %pre(MySQL55-server-5.5.32-1.cp1136.i386) scriptlet failed, exit status 1
    [20130924.154724]   error:   install: %pre scriptlet failed (2), skipping MySQL55-server-5.5.32-1.cp1136
    [20130924.154724] W Error Code: 2
    [20130924.154724] E The following possible errors were detected while installing RPMs:
    [20130924.154724] E %pre(MySQL55-server-5.5.32-1.cp1136.i386) scriptlet failed, exit status 1 install
    [20130924.154724]   The Administrator will be notified to review this output when this script completes
    [20130924.154724]   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
    [20130924.154724]   All required 'post' hooks have been run
    
    What files do I have to remove before mysql will be repaired? The names 'huge' and 'myservername' are mine, but I have no idea who 'justhost' is or why they are in the results page.
     
  4. yoHuge

    yoHuge Registered

    Joined:
    Jun 1, 2009
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    It's working now .. removed the PID files, then ran 'check_cpanel_rpms' again. Then ran easyapache again after that and it all works. Thanks.
     
Loading...

Share This Page