How to export all the databases with phpmyadmin
Asked Answered
C

8

36

Can I export all the databases with one-go using phpMyadmin?

If not what is the best way to do it?

Thanks in advance.

Countermove answered 17/5, 2011 at 15:24 Comment(0)
S
26

If you login as the root user, you should be able to select every database you want to backup, then export it from there.

  1. Open your PHPAdmin site in a web browser.
  2. Click on the "Export" tab enter image description here
  3. On the export page select the database you wish to backup or select all using the controls above the input field. enter image description here
  4. Then configure any options you would like to have. I highly suggest you read the documentation to determine exactly what you options you should use. You can read more about the options in the phpMyAdmin documentation
  5. Click go enter image description here
Skiing answered 17/5, 2011 at 15:27 Comment(2)
Not sure why this is the best answer because it doesn't answer the question (all the databases) and it doesn't point out a way to do it.Skateboard
This can be done by command also mysqldump -u username -p password –all-databases > dump.sqlSubsolar
L
41

Here are the steps to use to export all your mySQL databases using phpMyAdmin. (Dec 2015) As phpMyAdmin evolves new features are added.

  1. Open phpMyAdmin and select the Databases tab. Check that all your databases should are listed there.
  2. Select the Export tab, and then select the Custom tab. You do not want to use the default settings
  3. All the databases will be selected. Unselect any you do not want to backup. The system files are not included, and you do not need them.
  4. Under the "Output" option, select "Export databases as separate files". This will automatically change the download file to ZIP with the individual database files in it.
  5. Move down the the "Object creation options"
  6. Select "Add DROP TABLE / VIEW / PROCEDURE / FUNCTION / EVENT / TRIGGER statement"
  7. Unselect the "AUTO_INCREMENT value". Depending on the structure of your databases, you might have to select this. If you are not sure, just keep it selected.
  8. Click on "Go". The ZIP file will download and you can save that in a safe place.
Limen answered 21/12, 2015 at 6:8 Comment(2)
This was exactly what I was looking for, to export my databases to separate sql files. Sadly I do not have the "Export databases as separate files" option, I'm on phpMyAdmin 3.5.7 and MySQL 5.5.27Inapt
I had to update from phpMyAdmin 4.0.10 to 4.7.0 for the "Export databases as separate files" option to appear.Splint
S
26

If you login as the root user, you should be able to select every database you want to backup, then export it from there.

  1. Open your PHPAdmin site in a web browser.
  2. Click on the "Export" tab enter image description here
  3. On the export page select the database you wish to backup or select all using the controls above the input field. enter image description here
  4. Then configure any options you would like to have. I highly suggest you read the documentation to determine exactly what you options you should use. You can read more about the options in the phpMyAdmin documentation
  5. Click go enter image description here
Skiing answered 17/5, 2011 at 15:27 Comment(2)
Not sure why this is the best answer because it doesn't answer the question (all the databases) and it doesn't point out a way to do it.Skateboard
This can be done by command also mysqldump -u username -p password –all-databases > dump.sqlSubsolar
U
14

mysqldump is the easiest way. I've never done it with phpMyAdmin.

http://dev.mysql.com/doc/refman/4.1/en/mysqldump.html

mysqldump --all-databases > backup.sql
Unpaidfor answered 17/5, 2011 at 15:28 Comment(2)
It gives me current_database only.Bouffe
how can I import then those DB in the new server/host/machine?Earle
N
9

After you log in to phpmyadmin, just click export. It should select all databases by default.

Necessity answered 9/2, 2014 at 1:54 Comment(2)
I have done that but now when I am trying to import that file in a different phpmyadmin then it gives this error: MySQL said: Documentation #1046 - No database selectedCoadjutor
This leaves your new installation with no users or privileges, and therefore completely useless for migrating your databases with.Celluloid
S
3

You can do this with mysqldump and the --all-databases option:

mysqldump -u username -ppassword –all-databases > dump.sql
Substation answered 17/5, 2011 at 15:29 Comment(0)
B
3

Kyle Brost's Solution just exporting one Current Database for me.

By the way I found this link and got the solution that will may helpful to you:

mysqldump -u root -p --all-databases > alldb_backup.sql

Note: It will ask you for password, input it if you have set any password in MySQL or Press Enter directly.

Keep Exporting

Thanks :)

Bouffe answered 19/5, 2015 at 13:26 Comment(0)
S
0

this can be accomplished with mysqldump --all-databases -u username -p password

Solicitous answered 18/11, 2023 at 6:56 Comment(0)
D
0

I tried this, and it worked in 3 steps. I got all the database dumps:

enter image description here

Devilfish answered 9/6 at 21:35 Comment(1)
Using PhpMyAdmin 4.4.15.9, this exports all the tables from all the databases but with no database assigned.Autoeroticism

© 2022 - 2024 — McMap. All rights reserved.