Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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
3  
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
1  
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
1  
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

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.