To extract/export just the schema/design/create tables section of a MySQL table via the command line, you need to use a command such as:
mysqldump –no-data [databasename] [optional table name] -u[user name] -p > extract.sql
(enter the [username] mysql user password)
To import it again, use:
mysql -u [username] -p [databasename] < extract.sql See also: MySQL Docs: MySQLDump.
Be First to Comment