I upgraded the installed MySQL on my two VPSes about two months ago and I thought I already saved the steps somewhere or at least the saved the URL of the how to. I did not so when I tried to upgrade the Pagudpud Resort‘s (owned by the Jackoleros) database server, I don’t know where to start. The MySQL official website suggests(or at least, that’s how I understand it) that I recompile. I know I did not recompile before so after some fruitless googling, I finally found a working version. But first, thanks to remi for sharing the rpm.

Before we proceed, I’d like to remind you that this is for MySQL 5.5.14 on CentOS 5.6. My original MySQL install was 5.x. If your baseline environment is different from mine, then I suggest you look elsewhere for the tutorial. The source at the end of this post may help.

**** UPDATE *****
The following steps require the EPEL (Extra Packages for Enterprise Linux) so you’ll have to install epel first before proceeding. Here’s the command:
rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm

Step 1 login as root to your vps

Step 2 Install Remi repository
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
The result will something like..
Retrieving http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
warning: /var/tmp/rpm-xfer.cVJJxn: Header V3 DSA signature: NOKEY, key ID 00f97f56
Preparing... ########################################### [100%]
1:remi-release ########################################### [100%]

Step 3 Check availability of MySQL versions
yum --enablerepo=remi,remi-test list mysql mysql-server

the last lines of the output should be something like this.

Available Packages
mysql.i386 5.5.14-1.el5.remi remi
mysql-server.i386 5.5.14-1.el5.remi remi
[root@one ~]#

Step 4 Update or Install MySQL
yum --enablerepo=remi,remi-test install mysql mysql-server

Step 5 Restart MySQL
service mysqld start

Step 6 Upgrade MySQL Databases
mysql_upgrade -u root -p

***** NOTE : THE LAST STEP IS VERY IMPORTANT BECAUSE IT WILL CREATE PRIVILEGE TABLES ******

Source :
http://www.if-not-true-then-false.com/2010/install-mysql-on-fedora-centos-red-hat-rhel/

4 Thoughts on “How to Upgrade MySQL 5.0 to 5.5 in CentOS

  1. thanks….

  2. Hi,

    Please note that the the command to download and install EPEL needs to be changed due to the new http address as follows:

    rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm

    Otherwise this works great.

    Thanks for this great how to page.

    Regards,

    Lloyd

  3. Rithish on March 12, 2012 at 10:35 pm said:

    Thanks!

  4. Thank you very much!

Post Navigation