Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

2 Answers 2

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

 
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.