Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I do not have much experience with upgrading software on a Linux system but am of course familiar with 'yum update' commands. I am currently running a Media Temple DV 3.5 CentOS 5 server with MySQL 5.0.90 running. I want to upgrade to the latest (5.5) because I am looking to start using 'event schedulers', something not available until MySQL 5.1.

I have two respected repositories that are able to provide the yum software update but I am afraid that running the update on the repo could cause data loss, bad table manipulation/recreation, etc.

Any advice on this or past experience doing so?

(note, I would be usign remi and/or webtatic repos for reference to do the updates)

share|improve this question
Backup first... – Shane Madden Sep 6 '11 at 17:40
@Shane - thanks, I would backup before any update but that doesn't tell me if updating to the new version will have any impact on my data, existing table structures, stored procedures, etc. – JM4 Sep 6 '11 at 17:47
The only way to be certain is going to be to test. If you choose not to build a test environment, then you basically have backups, and you have to pray a lot to $deity. – Zoredache Sep 6 '11 at 18:27
up vote 2 down vote accepted

If you're worried, you should do the upgrade process on some other box first, i.e., a dress rehearsal with QA testing. You can set up a staging box using a virtual machine and get the software looking like what you have on your production box. Then dump out your prod data and load it into staging, do the MySQL update and do some testing.

share|improve this answer
Thank you for your suggestion but that seems like an abnormal amount of extra work to have this done. Setting up a virtual machine on an externally hosted server (DV by the way as I mention) hardly seems like a feasible option – JM4 Sep 6 '11 at 18:11
At a minimum, I would get something like VirtualBox installed locally, load up CentOS5 and MySQL 5.0.90 running, with a sample of your database (enough to do testing on). But, hey, it's not me that's potentially blowing up the production web site! – cjc Sep 6 '11 at 18:15
it would be nearly impossible (I state nearly) to load up a similar configuration of servers and unless they were identical, there are dependent packages which could greatly alter the outcome of the upgrade. Our primary server has had several (and I mean several) hours of work and manual tweaking for pci-dss compliance, sas70 certification, etc. While the update in theory should be similar if not identical, there are too many factors to consider to create an exact replica environment – JM4 Sep 6 '11 at 18:20
Why not just make an exact replica. If you are that concerned about rebuilding the box, surely you have a good backup and could simply restore into a VM right? Not being able to setup a testing box that is similar to your production environment is a sign you have done something wrong. – Zoredache Sep 6 '11 at 18:24
@Zoredache - good point. To answer your question, no we do not have a 'good' backup of the server setup. Can you provide any guidance on this? Wouldn't a backup like this run into the GB size? Creating a backup and downloading a 8 GB file would take us days. Mediatemple does not allow snapshot backups to be downloaded locally – JM4 Sep 6 '11 at 18:27

Not sure why this wasn't provided as an answer so here it is:

The recommended approach is to upgrade to the next major version first. You should go from 5.0 -> 5.1 -> 5.5.

As a general rule, to upgrade from one release series to another, go to the next series rather than skipping a series. To upgrade from a release series previous to MySQL 5.1, upgrade to each successive release series in turn until you have reached MySQL 5.1, and then proceed with the upgrade to MySQL 5.5. For example, if you currently are running MySQL 5.0 and wish to upgrade to a newer series, upgrade to MySQL 5.1 first before upgrading to 5.5, and so forth.

share|improve this answer

I upgraded my PHP just now. There is no clear answer. So I just tested it on my server:

Commands removed by moderator as this is a terrible idea in general.
The process described by the other answer is "correct".

It works, and this update didn't affect my MySQL databases. You need adjust some options in my.cnf ot restart the MySQL server.

share|improve this answer
Just because it worked for you doesn't mean it will work for everyone. You ALWAYS need to read the release notes, take backups, and be prepared for things that go wrong. "The MySQL 5.5 Release Notes describe significant new features you can use in 5.5 or that differ from those found in earlier MySQL releases. Some of these changes may result in incompatibilities." -MySQL Dev Upgrading from 5.1 to 5.5 Release Notes. – David W May 9 '13 at 12:07
I wish I had more downvotes for this. You clearly have no idea why the upgrade worked, nor can you make any reasonable claim as to why it might work for someone else. You definitely need to restart the MySQL service and shouldn't be doing an upgrade while it's running in the first place. This site is for professionals only. Your answer ranks as one of the most dangerous bits of misinformation I've ever run across on Server Fault. – Chris S May 9 '13 at 12:55
I meant to include the link to the Dev notes I quoted from:…. Also, Chris, I'll help you out. – David W May 9 '13 at 12:59
Why isn't this answer just deleted? I flagged it as "not an answer" when it was originally posted, given it's foolish and dangerous to do it, the dangerous commands were removed, and now we're left with this confusing answer that really has no value. – slm May 14 '13 at 22:41

Your Answer


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.