How to upgrade mysql5.0 to 5.5 on CentOS

5,023

Solution 1

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

Solution 2

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:
5,023

Related videos on Youtube

shin
Author by

shin

IB Diploma and MYP mathematics teacher who loves coding.

Updated on September 18, 2022

Comments

  • shin
    shin almost 2 years

    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.

    • skarap
      skarap about 11 years
      btw: why are you trying to upgrade to mysql5.5? Is there some new functionality that you need?
  • Oleg Artym
    Oleg Artym about 12 years
    rpm -e package will produce an error if there are installed packages that have the package as a dependency.
  • MadHatter
    MadHatter about 12 years
    And that's my "clever thing for today on SF", and it's not even 7am. Thank you!
  • qweet
    qweet about 12 years
    My goodness, that yum-plugin-replace might prove to be a godsend for me.
  • Ecropolis
    Ecropolis over 9 years
    this worked for me but I had to run rpm -e mysql.i386 --nodeps first