Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
    
btw: why are you trying to upgrade to mysql5.5? Is there some new functionality that you need? –  skara May 22 '13 at 21:18

3 Answers 3

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

share|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

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
share|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

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
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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