Difference between revisions of "Selecting a table from a mysqldump file"

From MyWiki
Jump to: navigation, search
(Created page with "sed -n -e '/DROP TABLE.*mytable/,/UNLOCK TABLES/p' mydump.sql > tabledump.sql <br> sed -n -e '/CREATE TABLE.*mytable/,/CREATE TABLE/p' mysql.dump > mytable.dump<br> Referenc...")
 
(No difference)

Latest revision as of 15:43, 10 June 2015

sed -n -e '/DROP TABLE.*mytable/,/UNLOCK TABLES/p' mydump.sql > tabledump.sql

sed -n -e '/CREATE TABLE.*mytable/,/CREATE TABLE/p' mysql.dump > mytable.dump

Reference : http://stackoverflow.com/questions/1013852/can-i-restore-a-single-table-from-a-full-mysql-mysqldump-file