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

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 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
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 do you know whether Lholleman is using xampp? – Ashwin A Apr 5 '12 at 9:31

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.