1

I am trying to upgrade mysql from 5.0 to 5.5 on my local server. I have CentOS 5.8.

I have php5.3 installed. When I type

yum remove mysql mysql-*

The following comes out.

Removing:
 mysql                x86_64       5.0.95-1.el5_7.1       installed       8.2 M
 mysql-server         x86_64       5.0.95-1.el5_7.1       installed        22 M
Removing for dependencies:
 perl-DBD-MySQL       x86_64       3.0007-2.el5           installed       328 k
 php53-mysql          x86_64       5.3.3-7.el5_8          installed       210 k

Q1. Should I type yes to remove all? If it is no, how to avoid removing php53-mysql? Do I need it?

Q2. After removing it, I am going to type the following. Is it correct.

yum install mysql55 mysql55-server --enablerepo=webtatic
service mysqld start
mysql_upgrade

Thanks in advance.

1
  • btw: why are you trying to upgrade to mysql5.5? Is there some new functionality that you need?
    – skarap
    May 22, 2013 at 21:18

3 Answers 3

6

I'd suggest you use mysql 5.5 from IUS instead of webtatic. With it, you can also get yum-plugin-replace, which will let you do yum replace mysql --replace-with=mysql55 and it will figure out the dependencies and install the new package. This would avoid removing php53-mysql (which you need if you have any PHP code that interacts with MySQL).

2
  • And that's my "clever thing for today on SF", and it's not even 7am. Thank you!
    – MadHatter
    May 12, 2012 at 5:27
  • 1
    My goodness, that yum-plugin-replace might prove to be a godsend for me.
    – qweet
    May 12, 2012 at 20:54
1

Webtatic has added yum-plugin-replace to it's repository, and the guide is updated to allow upgrading via this method:

http://www.webtatic.com/packages/mysql55/

Assuming CentOS 5.x:

rpm -Uvh http://mirror.webtatic.com/yum/el5/latest.rpm
yum install mysql.`uname -i` yum-plugin-replace
yum replace mysql --replace-with mysql55
1
  • this worked for me but I had to run rpm -e mysql.i386 --nodeps first
    – Ecropolis
    Jan 15, 2015 at 14:30
0

A1 > Instead of doing yum remove. Do rpm -e on the package name, that would help retaining the dependencies

 rpm -e mysql-server. 

A2> Your second set of instructions look good. Since this is more of a fresh install, I think you MAY need to run the following steps instead of mysql_upgrade.

 Firstly, run mysql_install_db
 Secondly, run mysql_secure_installation
2
  • rpm -e package will produce an error if there are installed packages that have the package as a dependency.
    – jsbillings
    May 12, 2012 at 2:41
  • rpm {-e|--erase} [--nodeps] PACKAGE_NAME
    – Chakri
    May 12, 2012 at 19:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .