To exclude some table data, but not the table structure. Here is how I do it:
Dump the database structure of all tables, without any data:
mysqldump -u user -p --no-data database > database_structure.sql Then dump the database with data, except the excluded tables, and do not dump the structure:
mysqldump -u user -p --no-create-info \ --ignore-table=database.table1 \ --ignore-table=database.table2 database > database_data.sql Then, to load it into a new database:
mysql -u user -p newdatabase < database_structure.sql mysql -u user -p newdatabase < database_data.sql