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.

My server crashed yesterday and now I have the hard disk mounted in a Linux live environment. How can I backup all the databases so I can copy them to the new server?

I don't know all of my database names so I can't use mysqldump for each one of them.

EDIT: I don't have and can't install the MySQL service.

share|improve this question

migrated from stackoverflow.com Apr 5 '12 at 13:29

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

    
Try mysqldump5 --help at the command line - it is in there. –  halfer Apr 5 '12 at 9:21
    
Probably better suited over @ superuser? –  Nanne Apr 5 '12 at 9:22
    
Or maybe ServerFault –  Cylindric Apr 5 '12 at 9:23
    
mysqldump is the way. –  Marcus Adams Apr 5 '12 at 11:11

2 Answers 2

up vote 5 down vote accepted
mysqldump --all-databases > databasebackup.sql
share|improve this answer

You can try to copy your files from C:\xampp\mysql\data\DATABASE\ into your new database folder.

share|improve this answer
    
Can someone confirm this? I heard you can't just copy InnoDB databases. –  LHolleman Apr 5 '12 at 9:28
1  
@hans..how do you know whether Lholleman is using xampp? –  Ashwin A Apr 5 '12 at 9:31

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.