0

I have a db and looking for a mysql commands to extract Extract DDL and DML and Exclude tables which are not required

could you please let me know how we can do it via command prompt?

Thanks, Kathir

Kathir
  • 2,733
  • 12
  • 39
  • 67

1 Answers1

2

Mysqldump:

http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html

able to dump DDL/DML and has option for exclude list of tables:

http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html#option_mysqldump_ignore-table

Sergey N Lukin
  • 575
  • 2
  • 16
  • can you pls specific the command for DDL as well as DML? – Kathir Oct 22 '13 at 09:50
  • for ddl: mysqldump -uroot -pmysql --no-data testdb > testdb_exported_ddl_file.sql for dml: mysqldump -uroot -pmysql --skip-triggers --no-create-info --ignore-table=testdb.emp_table --ignore-table=testdb.emp_history testdb > testdb_dml.sql – Kathir Nov 13 '13 at 08:46