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?

link|improve this question
feedback

4 Answers

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.

link|improve this answer
feedback

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

#!/bin/bash

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

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

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 :)

link|improve this answer
feedback

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.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.