Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to upgrade and install MySQL5.5 under CentOS6.2

2025-03-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces "how to upgrade and install MySQL5.5 under CentOS6.2". In daily operation, I believe many people have doubts about how to upgrade and install MySQL5.5 under CentOS6.2. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the doubts of "how to upgrade and install MySQL5.5 under CentOS6.2". Next, please follow the editor to study!

1. Back up the data first, although the successful upgrade data will not be lost, but just to be on the safe side.

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.

Service mysqld stop

All right, let's get down to business.

two。 Uninstall the old version of mysql

Yum remove mysql mysql-*

After the execution, we will see if there is any residual mysql-libs or something.

Yum list installed | grep mysql

If there is, and confirm that it is useless, you can also delete it.

Yum remove mysql-libs

Note that deleting mysql-libs may have an impact on some dependent software, which we will not discuss here.

All right, the unloading is almost over.

3. Install mysql5.5

If you are not lazy, it may be better to choose to compile and install

Here we discuss the process of using yum installation.

After many detours, I found that I needed 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

At this time, you run again:

Yum-enablerepo=remi,remi-test info mysql mysql-server

You will find that the version of mysql is 5.5.x. Do not hesitate to install it.

Yum-enablerepo=remi,remi-test install mysql mysql-server

This completes the installation. The next step is to start and upgrade.

4. Start and upgrade

At this time, nine times out of ten you want to start directly will report an error, the main problem is two: one is the configuration file, 5.5 compared to 5.1 some configuration has been renamed, which requires you to make a little improvement compared to the startup error log. Second, there is no implementation of mysql_upgrade.

Run after ensuring that the configuration file is fine:

Mysql_upgrade-u root-p

Wait for him all ok.

Try running mysql again.

Service mysqld start

At this point, the study on "how to upgrade and install MySQL5.5 under CentOS6.2" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report