Method to take mysql dump of table structures

Inorder 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

Trackback URI | Comments RSS

Leave a Reply

You must be logged in to post a comment.