CentOS 6.2 Upgrade installed as a MySQL 5.5 method _linux

Source: Internet
Author: User
Tags mysql version

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]

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.