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 am working on a project that is about 4 years old and has been written in PHP 5.2 (php was updated along the way) and MySQL 4. There is currently a test server and production server that all need to be updated to the latest stable version of PHP and MySQL5.

I have a few concerns about this update and limited experience in managing servers.

I am worried that simply upgrading MySQL and PHP on the actual servers will somehow break the company vital applications. I was wondering if this concern is a valid one and what measures I can take to quickly revert back to the older version if I have to? Also, what is the quickest way to safely complete this update?

I appreciate any suggestions.

Thanks in advance!

share|improve this question
up vote 3 down vote accepted

Read the manuals on upgrading MySQL from the 4 release to MySQL 5 , from 5.0 to 5.1 and to 5.5.

In short:

  • make back-ups
  • start on your test system, find application and MySQL issues by testing the upgrade procedure, your data and your application
  • go from 4.1 to 5.0
  • upgrade from 5.0 to 5.1
  • and then upgrade to 5.5 according to the manual.

There are known incompatabilities.

share|improve this answer
Thank for the reply. Can you please explain step 2? There aren't any issues as of yet on MySQL 4, do you mean test the upgrade procedure after updgrading to MySql 5.0? – AnchovyLegend Dec 17 '13 at 16:48
Typically you don't want to test on your production system, right? Some application and/or database issues that pop up may take some time and effort to track down let alone to solve... It's really obvious to test upgrades before doing them in the live production environment and failing miserably, but often enough people either don't have a test environment or overlook proper testing. There's a heap of incompatible changes mentioned in manuals, which may or may not be issues for YOU, but you need to test to confirm that. – HBruijn Dec 17 '13 at 16:58
Thanks for clarifying. This makes sense now. So you meant upgrade the test server only to MySQL5 first, test it thoroughly, resolve issues, then if all is well upgrade production. – AnchovyLegend Dec 17 '13 at 18:00

I would not try to do this in place.

If I were doing this I would go for new hardware and configure it appropriately with the versions of PHP and MySQL that I wanted to use going forward.

I would test that this worked with a small but real dataset and take appropriate action to remedy any problems.

I would then work out how to migrate the data from the old system to the new one. I would write copious notes and where applicable automate with scriptsm the eentual aim being to have a document that can easily be followed.

I would practice migrating the data from the old server to the new server and test to ensure that it had moved across correctly, taking appropriate action to modify the process to resolve issues.

I would also need to figure out how you're going to swap in the new hardware and factor that into your plan.

Once I was happy with my process I would implement it.

share|improve this answer

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.