Method to take mysql dump of table structures

In order to take the dump of a database table structure you can use the option “-d” of mysqldump.

The syntax is given below.

$ mysqldump -u USERNAME -p -d  DATABASENAME  –tables TABLENAME1 TABLENAME2  >  FILENAME.sql

Replace the USERNAME, DATABASENAME, TABLENAME, FILENAME with the original one.

You can verify the file for the table structures.

$ more  FILENAME.sql
Both comments and pings are currently closed.

Comments are closed.