tags:

views:

18

answers:

1

I am using mysql and trying to export database through below command

mysqldump -uroot -p -d database_name > file.sql

It ran successfully. However it did not export the data, it only export the schema of database.

anyone know why is this happening?

Thanks in advance.

+3  A: 

According to the mysqldump documentation:

--no-data, -d

Do not write any table row information (that is, do not dump table contents). This is useful >if you want to dump only the CREATE TABLE statement for the table (for example, to create an >empty copy of the table by loading the dump file).

Try removing the -d from your command line.

Scott W