Using mysqldump to Backup Database Structure and Data Separately
I have have been developing on a MySQL database where a small amount of test data is still over a half a million rows or more. So exporting the schema to pass it along to others takes forever. Fortunately you can export just the structure of the database and nothing else (which is much faster).
mysqldump -h hostname -u user database -RQdp > structure.sql
The option d is the key here. It stands for "no data". The option R will make it include your stored procedures and functions. And the option Q puts backticks (`) around your table names, column names, etc to prevent keyword errors on import.
Alternatively you can also export just the data.
mysqldump -h hostname -u user database -Qtp > data.sql
The option t means "no create info". Which means it wont put any CREATE TABLE statements in your export.

