mysql extract table from dump


sed -n -e '/DROP TABLE.*`my_table`/,/UNLOCK TABLES/p' mydump.sql > table.sql

make sure table is correct:
egrep -h "DROP TABLE|CREATE TABLE" table.sql

DROP TABLE IF EXISTS `my_table`;
CREATE TABLE `my_table` (

Leave a Reply

Your email address will not be published. Required fields are marked *