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 am hosted on a Media Temple DV 3.5 server and looking to upgrade from mysql 5.0.90 to the latest mysql so I can use triggers and foreign keys. I am a bit nervous to do so because I don't have a 'test' server to match my production server.

We have full server backups so in the event something goes wrong, I know I can always revert but I am curious, is there a way to backup ALL mysql data (all databases, all users, everything), run the mysql update with Yum package manager (we have CentOS 5.3) and then import the missing data if any exists once upgraded?

share|improve this question
up vote 6 down vote accepted

A mysqldump output file is valid SQL, so you can mess around in the file and pick and choose what you want.

So, yes, if data theoretically disappeared you could selectively replace it from the dump.

share|improve this answer
including the users and privileges? – JM4 Sep 23 '11 at 21:00
Yes, including database users and permissions, if you have the mysql database besides the application database. – Mircea Vutcovici Sep 23 '11 at 21:03
@JM4 Sure - they're stored in the mysql database. Back it up, or just use the --all-databases option of mysqldump. – Shane Madden Sep 23 '11 at 21:04

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.