Upgrading Mysql 5.0.95

Home » General » Upgrading Mysql 5.0.95
General 7 Comments

Hi All,

I’m getting things ready to upgrade my aging installation of MySQL
5.0.95 on my CentOS 5 LAMP server. With the impending EOL date of 3.31
fast approaching my sense of doom and urgency is increasing.

I see that the necessary packages are available in @base and @updates –
mysql51 and mysql55 respectively but from all the information I’ve read on the matter so far I’m left with a few questions I don’t yet have answers to.’

What I’ve done so far and thankfully was able recover from:

1. installed and enabled to epel repo
– ran yum remove mysql
– this command wanted to remove a few things I wanted to keep in
place like dovecot and a few php53 packages. I didn’t want to have
to go back and clean up any messes that would create. So, I used
the rpm -e –nodeps command to remove the MySQL packages.
– because this was a redhat repo it installed the binaries in a
total different place AND tossed all my existing data directories.
and yes I spit coffee all over my laptop screen and yes, I did have
data dir backups and a dump of MySQL data. HOLY CRAP!

2. removed the epel packages
– disabled this repo – for ever at least for now…

3. reinstalled the old MySQL 5.0.95 packages – because I was
hyper-ventilating
– reset roots password
– imported all the databases from the dump and checked my web apps
– everything working again.
– I did have to recreate the mysql.servers table to be able to flush
privileges.

I understand that mysql51 is available in @base for the sole purpose of upgrading old MySQL and mysql55 is in updates for getting to 5.5, however here is where things get a little fuzzy for me:

Steps for Upgrading (as I understand them):

1. Take a dump of all mysql database using mysqldump –add-drop-database
–all-databases
2. Stop mysql services
3. make a backup of data directories: /var/lib/mysql (but its not
_supposed_ to remove the data directories.)
3. yum remove mysql mysql-server (again, it will include a few things I
don’t want removed. so, i’ll have to use rpm -e –nodeps and list the packages for removal then issue yum clean all.’
4. yum install mysql51
5. start mysql service
6. run command mysql_upgrade…
(here’s where things start getting fuzzy)

Question #1:
is this command to be run from the commandline or
should I log into mysql as root user and run the command?

Question #2:
at this point I will have mysql 5.1 installed and running but to get
up to 5.5 am I expected to yum remove 5.1 and then yum install 5.5
from @updates and repeat steps 5 and 6 OR simply run the command
yum update mysql51* to catch all already installed mysql51 packages
to and then run the mysql_update command to bring data up to date
with the current mysql install?

THank you for your kind attention…

7 thoughts on - Upgrading Mysql 5.0.95

  • Heavens no… I love my CentOS 5 server. I going to try and keep it around as long as possible. I’ve got another machine in the rack that I’ve got CentOS 7 installed on, but there are differences in that OS and the items running on it that I don’t like at all. SELinux comes to mind…

    No, I definitely have plans on running CentOS5 for while long. Mostly because there’s an issue with one of the web apps I’m running on my C5
    server that is having problems running correctly on C7. I haven’t figured out why yet.

  • I figured that since you mentioned the EOL date of 3.31, you understood that meant no new updates for CentOS 5. No more support for CentOS 5. That means you’d be putting in all this work to migrate mysql on a platform that isn’t supported anymore. Why bother updating mysql then? Its going to be living on an unsupported platform anyway, with no bug fixes or security patches.

  • I think I explained that above… There are issues with one of my main web applications on my CentOS 7 box that are taking a lot more time resolving then was anticipated, so I’d like to upgrade MySQL on the CentOS 5 server while I’m working things out.

    Guess I’ll stumble through this as well…

  • Packages don’t disappear after 3/31. They just get moved to vault.CentOS.org, where they will remain, never to be updated again. Heck, you can still get CentOS 2.1 packages from there.

  • It’s ok… its all a mute point because earlier today I did everything in true linux tradition: I fixed it until I broke it and I broke it but good. MySQL no longer runs on that LAMP server. Now it’s just a LA_P
    server. :-) and doing a fine job running Sendmail I might add.

    I’ve just had to move all the databases over to the host I’m migrating to a little earlier than I’d planned.

    Mark

LEAVE A COMMENT