It was an egg-ache escalation process.
Complete steps:
1. First back up the data, although the successful upgrade data will not be lost, but backed up with insurance.
Sqldump-u xxx-h xxx-p 3306-p--all-databases > Databases.sql
It is best to back up a copy of the data file and configuration file.
Cp-r/data/mysql Mysql-5.1-data
CP/ETC/MY.CNF my.cnf-5.1
Stop the MySQL service after the backup is complete.
Service Mysqld Stop
All right, get to the point.
2. Uninstall old version of MySQL
Yum Remove MySQL mysql-*
After the execution, see if there are any remnants of mysql-libs or something.
Yum List Installed | grep MySQL
You can delete it if you have it and make sure it doesn't work.
Yum Remove Mysql-libs
Note that removing mysql-libs may have an impact on some dependent software, which we do not discuss here.
Well, the uninstall action is basically over.
3. Install Mysql5.5
If you're not lazy, then it might be better to choose to compile the installation
Here we discuss the process of using the Yum installation.
After taking the n many detours, I found it necessary to install some new repo first.
RPM-UVH http://download.Fedora.RedHat.com/pub/epel/6/i386/epel-release-6-2.noarch.rpm
RPM-UVH http://mirrors.neusoft.edu.cn/epel/6/i386/epel-release-6-7.noarch.rpm
RPM-UVH http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
RPM-UVH http://dl.iuscommunity.org/pub/ius/stable/Redhat/6/x86_64/epel-release-6-5.noarch.rpm
RPM-UVH http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
This time you run again:
Yum--enablerepo=remi,remi-test info MySQL mysql-server
You will find that the MySQL version is already 5.5.x. Do not hesitate to install the.
Yum--enablerepo=remi,remi-test install MySQL Mysql-server
Install to this end. The next step is to start and upgrade.
4. Start Up and upgrade
This time you want to start directly ten will be the error, the main problem two: one is the configuration file, 5.5 compared to 5.1 some configuration renamed, this requires you to start a little bit better than the wrong log. Second, there is no implementation of Mysql_upgrade.
Run after making sure that the configuration file is not a problem:
Mysql_upgrade-u root-p
Wait for him all OK.
Try running MySQL again.
Service mysqld Start
I hope God bless what you see is green [OK]