mysqldump exports only one table

danieln picture danieln · Sep 11, 2013 · Viewed 188.1k times · Source

I was using mysqldump to export the database, like this:

mysqldump -u root -ppassword my_database > c:\temp\my_database.sql

Somehow, it only exports one table. Is there something I'm doing wrong?

Answer

developerCK picture developerCK · Sep 11, 2013

try this. There are in general three ways to use mysqldump—

in order to dump a set of one or more tables,

shell> mysqldump [options] db_name [tbl_name ...]

a set of one or more complete databases

shell> mysqldump [options] --databases db_name ...

or an entire MySQL server—as shown here:

shell> mysqldump [options] --all-databases