Reputation: 323
I know that with a mysql_dump I can get the current tables and data inside of those tables into a sql file.
However, how can I get just the CREATE TABLE descriptions? I don't want to carry all the data, just be able to create the same tables in my local machine.
Upvotes: 0
Views: 60
Reputation: 46
mysqldump -d -u someuser -p mydatabase > backup.sql
The -d option is the --no-data option
https://dev.mysql.com/doc/refman/5.1/en/mysqldump.html#option_mysqldump_no-data
Upvotes: 1
Reputation: 44844
show create table `table_name`
will show the create structure.
https://dev.mysql.com/doc/refman/5.0/en/show-create-table.html
Upvotes: 0
Reputation: 3809
You want the -d switch (or --no-data) for mysqldump (not mysql_dump) - it means "no data".
Upvotes: 0