2

From WHM on CENTOS 5.9 x86_64 I tried to upgrade MySQL 5.1 to 5.5. The upgrade not worked and the MySQL is not starting anymore. Error:

Beginning MySQL upgrade...
Running: /usr/local/cpanel/scripts/check_cpanel_rpms --targets=MySQL50,MySQL51,MySQL55 --fix
[20130325.101333] 
[20130325.101333] Problems were detected with cPanel-provided files which are RPM controlled. 
[20130325.101333] If you did not make these changes intentionally, you can correct them by running: 
[20130325.101333] 
[20130325.101333] > /usr/local/cpanel/scripts/check_cpanel_rpms --fix 
[20130325.101333] The following RPMs are missing from your system: 
[20130325.101333] MySQL55-server.5.5.30-1.cp1136 
[20130325.101334] Removing 0 broken rpms: 
[20130325.101334] rpm: no packages given for erase 
[20130325.101335] Downloading http://httpupdate.cpanel.net/RPM/11.36/centos/5/x86_64/rpm.md5 
[20130325.101336] MySQL55-server-5.5.30-1.cp1136.x86_64.rpm already downloaded 
[20130325.101336] Hooks system enabled 
[20130325.101336] Checking for and running RPM::Versions 'pre' hooks for any RPMs about to be installed 
[20130325.101336] All required 'pre' hooks have been run 
[20130325.101336] No RPMS need to be uninstalled 
[20130325.101336] Installing new rpms: MySQL55-server-5.5.30-1.cp1136.x86_64.rpm 
[20130325.101336] Preparing packages for installation... 
[20130325.101337] You have more than one PID file: 
[20130325.101337] -rw-rw---- 1 mysql mysql 5 Aug 10 2011 /var/lib/mysql/cpanel-x64.pid 
[20130325.101337] -rw-rw---- 1 mysql mysql 5 Jan 8 17:32 /var/lib/mysql/serverpv.pid 
[20130325.101337] Please check which one (if any) corresponds to a running server 
[20130325.101337] and delete all others before repeating the MySQL upgrade. 
[20130325.101337] error: %pre(MySQL55-server-5.5.30-1.cp1136.x86_64) scriptlet failed, exit status 1 
[20130325.101337] error: install: %pre scriptlet failed (2), skipping MySQL55-server-5.5.30-1.cp1136 
[20130325.101337] W Error Code: 1 
[20130325.101337] E The following possible errors were detected while installing RPMs: 
[20130325.101337] E %pre(MySQL55-server-5.5.30-1.cp1136.x86_64) scriptlet failed, exit status 1 install 
[20130325.101337] The Administrator will be notified to review this output when this script completes 
[20130325.101337] Checking for and running RPM::Versions 'post' hooks for any RPMs just installed 
[20130325.101337] All required 'post' hooks have been run 
MySQL upgrade completed successfully

Please advice what to do. I didn't find any MySQL processes to kill and I can't see the mysql folder in /var/lib..."no such folder" in ssh ls -al.

Please help :) Thank You.

D S
  • 21
  • 1
  • 2

2 Answers2

2

For me the key to the problem was found in these lines:

[20130325.101337] You have more than one PID file: 
[20130325.101337] -rw-rw---- 1 mysql mysql 5 Aug 10 2011 /var/lib/mysql/cpanel-x64.pid 
[20130325.101337] -rw-rw---- 1 mysql mysql 5 Jan 8 17:32 /var/lib/mysql/serverpv.pid 

I did a cat (cat /var/lib/mysql/xxx.pid) on these pid files and they did not correspond to any running processes (ps ax). So I removed both of them (rm /var/lib/mysql/xxx.pid) and started the MySQL upgrade process again, and it all worked. (It may also be necessary to run the EasyApache again, if it is still not working.)

talyric
  • 973
  • 2
  • 11
  • 14
0
  1. ps -ax| grep mysql to check the running processes
  2. kill -9

After you've made sure all running processes are killed rerun the upgrade. Since the website works there are still mysql processes left and runnig.

  • ps -ax| grep mysql returned only 13872 pts/1 S+ 0:00 grep mysql Note: The website is not working – D S Mar 25 '13 at 14:43
  • Try this rpm -qa | grep mysq and print the out. – user2207891 Mar 25 '13 at 15:24
  • cpanel-perl-514-DBD-mysql-4.021-1.cp1136 libmysqlclient15-5.0.95-1.w5 cpanel-mysql-5.0.96-1.cp1136 cpanel-mysql-libs-5.0.96-1.cp1136 This is the output for rpm -qa | grep mysq – D S Mar 25 '13 at 16:32