Mysql : dump database along data

masterofdestiny picture masterofdestiny · Dec 24, 2012 · Viewed 46.8k times · Source

I want to dump my database along the table schema and the table data also using the unix command line .

I used .

mysqldump -d -u root  -p frontend > frontend.sql

But above command is dumping only schema not the data from the database .

Please help me out how can i dump the database along the data also.

Answer

Mari picture Mari · Dec 24, 2012
backup: # mysqldump -u root -p[root_password] [database_name] > dumpfilename.sql

This will do,

If your requirement is to dump data alone then go for this,

To export to file (data only)

mysqldump -u [user] -p[pass] --no-create-db --no-create-info mydb > mydb.sql