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

Ok, I have tried to browse the web but I am not sure how to do this. My server is a production server and I want a smooth upgrade, is this possible? Could I just download the latest version of mysql and install it or how should I do?

One thing for sure, I know that I need to backup all databases and users...what then?

share|improve this question

migrated from Apr 16 '11 at 22:59

This question came from our site for professional and enthusiast programmers.

On what platform? – Pekka 웃 Apr 16 '11 at 22:05

Do you mean MySQL 5.0.92 or MySQL 5.5 latest?

For upgrade to MySQL 5.0.92
If you change versions, I would recommend that you setup a virtual machine (VM) where you install a test setup, so you don't mess up your production environment.

  1. Install your OS in the VM (same version as on the production machine.)
  2. Install MySQL (same version as on the production machine).
  3. Restore your database, grant tables and my.ini on the VM
  4. Check that your database works the same on the production machine and the VM.
  5. You now have a test setup that you can use as a starting point.
  6. Make a full backup of the VM (this is called an image).
  7. Upgrade MySQL on the VM
  8. Restore the database on the VM
    (if needed, should not be needed for an upgrade from 5.0.26 to 5.0.92)
  9. Test to see if everything works the same on the VM as on the production machine.
  10. If everything works: Make another image of the VM.
  11. Make a full backup of the production machine. (OS, MySQL, data, ... everything).
  12. Remove the hard disk from the production machine and insert a new blank harddisk
  13. Restore the backup made in step 11 to the new harddisk.
    (You now have a full backup on the old harddisk that you can fall back on if need be).
  14. Test to see if everything works, you can use the VM to compare if need be.
  15. Now you can upgrade your production machine to 5.0.92

Upgrade to MySQL 5.5 latest

For upgrading from 5.0 to 5.1 read this:
For upgrading from 5.1 to 5.5 read this:

First upgrade from 5.0 to 5.1.
Then upgrade to 5.5.

Remember to use the steps above to make sure you don't lose any data.

And keep backups of every step. do not overwrite media
And remember a backup is not a backup unless you have successfully restored it!

Good luck.

share|improve this answer

The only thing that I would add, whether you upgrade to 5.0.x, 5.1.x, or 5.5.x, is to test your application with the new version extensively (step 9 above). Not a cursory test or just that you can select * from table;. Make sure every type of query you run in your app gets tested and that everything works as expected. The worst thing that could happen is you have to restore a backup and possibly lose some data.

share|improve this answer
Yes, the new system is coded for 5.5.9 so there shouldnt be any issues with that. Do i have to uninstall mysql first, or is it possible to just install the new version without removing the old? – Joakim Krassman Apr 17 '11 at 20:51

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.