MySQL 5.1升级到5.5错误

时间:2013-03-25 14:11:04

标签: mysql centos upgrade whm

来自CENTM 5.9 x86_64上的WHM我尝试将MySQL 5.1升级到5.5。 升级不起作用,MySQL不再启动了。错误:

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

请建议做什么。我没有找到任何MySQL进程来杀死我无法在/var/lib中找到mysql文件夹。“没有这样的文件夹”在ssh ls -al。

请帮助:)谢谢。

2 个答案:

答案 0 :(得分:2)

对我来说,问题的关键在于以下几行:

[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 

我对这些cat文件做了cat /var/lib/mysql/xxx.pidpid),但它们与任何正在运行的进程(ps ax)都不对应。所以我删除了它们(rm /var/lib/mysql/xxx.pid)并再次启动了MySQL升级过程,这一切都奏效了。 (如果仍然无法运行,可能还需要再次运行EasyApache。)

答案 1 :(得分:0)

  1. ps -ax | grep mysql检查正在运行的进程
  2. kill -9
  3. 确保所有正在运行的进程都被杀死后重新运行升级。 由于网站工作,仍然有mysql进程和runnig。