How to take dump of database structure only? Provide me the syntax to take mysqldump structure only.
You can use -d option with mysqldump command to take the structure only backup of database.
Here is the complete example:
mysqldump -d -uroot -proot mydatabase > mydatabase.sql
mysqldump client is a backup program which can be used to dump a database or a collection of databases for backup or transfer to another SQL server (not necessarily a MySQL server). The dump typically contains SQL statements to create the table, populate it, or both. However, mysqldump can also be used to generate files in CSV, other delimited text, or XML format.
~/mysql/bin/mysqldump -u root database_name ORDERS > orders.txt
1. command to dumb only tables definitons , not the data ? use ?d command? if path is not set then you need to run that command from mysql/bin directory
./mysqldump -d -u root database_name ORDERS , CLIENTS , COMPANY > ~/tmp/test.database.sql
2.Command to receate table from that file
mysql -u root database_name < ~/tmp/test.database.sql
to read more about it see here **Deleted**