Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mysqldump exports only one table

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?

like image 540
danieln Avatar asked Sep 11 '13 12:09

danieln


People also ask

How do I export a single table?

in order to dump a set of one or more tables, shell> mysqldump [options] db_name [tbl_name ...] Show activity on this post. This will export the tableName to the file tableName.

Is Mysqldump capable of exporting a database?

There are three ways in which the mysqldump tool can be used: First, it can be used to export specific tables in a MySQL database. Second, it can be used to export databases. Third, it can be used to export an entire MySQL server.

How do I export selected rows in MySQL?

If you want to export only certain rows from a MySQL database using mysqldump , you can select the records using the --where option. It dumps only rows selected by the given WHERE condition. Quotes around the condition are mandatory if it contains spaces or other characters that are special to your command interpreter.


1 Answers

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 
like image 159
developerCK Avatar answered Oct 02 '22 11:10

developerCK