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.

 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

Thanks in advance.

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

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).

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

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


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
| improve this answer | |
  • this worked for me but I had to run rpm -e mysql.i386 --nodeps first – Ecropolis Jan 15 '15 at 14:30

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
| improve this answer | |
  • rpm -e package will produce an error if there are installed packages that have the package as a dependency. – jsbillings May 12 '12 at 2:41
  • rpm {-e|--erase} [--nodeps] PACKAGE_NAME – Chakri May 12 '12 at 19:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.