Friday, May 14, 2010

Dump only selected tables of a mysql database

If any case if you want to get the database dump of the selected tables of a mysql server.

  
mysqldump -u user -p DBname TB1 TB2 > dump.sql


if you want to ignore some of the tables

  
mysqldump -u user -p DBName --ignore-table=database.table1 --ignore-table=database.table2 > dump.sql

No comments:

Post a Comment