Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 would like to know how to dump all databases into a folder. I'm using a Linux/Debian Afer connecting on the server with root access I make

$ mysql -u admin -p

To connect on mysql.

Then which commands are to extract all databases created in my Plesk Panel?

share|improve this question

You can use the mysqldump command

mysqldump -u user -p --all-databases >file.sql

and a quick hack at a script which does much the same but puts the databases in individual files


echo "show databases;" | mysql -u root --password='Password' | while read databa
    echo dumping $databasename
    mysqldump -u root --password='Password' "$databasename" >"$databasename.sql"

share|improve this answer
This is the best. You realy help to me. – Seik Dec 6 '11 at 17:01

If you have SSH access, you can the command:

mysqldump -u root -p --all-databases > /path/to/outfile

Then, you can download the generated file.

share|improve this answer

While connected with SSH, you can issue the following commands.

To dump all your MySQL databases:

mysqldump --user=<user> --password=<pwd> -A > /PATH/TO/DUMPFILE.SQL

If you want to dump specific databases:

mysqldump --user=<user> --password=<pwd> --databases DB_NAME1 DB_NAME2 DB_NAME3 > /PATH/TO/DUMPFILE.SQL

It's really that simple :)

share|improve this answer

Then which commands are to extract all databases created in my Plesk Panel?

What's plesk got to do with it?

Just ssh on and run mysqldump, writing the output to a directory you can read via ssh/ftp/http and download the files.

share|improve this answer

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.