这篇文章上次修改于 2449 天前,可能其部分内容已经发生变化,如有疑问可询问作者。 因为数据表没设计记录历史变更,业务需要查找某表前n月记录 You can try to use sed in order to extract only the table you want. Let say the name of your table is mytable and the file mysql.dump is the file containing your huge dump: $ sed -n -e '/CREATE TABLE.*mytable/,/UNLOCK TABLES/p' mysql.dump > mytable.dump This will copy in the file mytable.dump what is located between CREATE TABLE mytable and the next CREATE TABLE corresponding to the next table. You can then adjust the file mytable.dump which contains the structure of the table mytable, and the data (a list of INSERT). http://stackoverflow.com/questions/1013852/can-i-restore-a-single-table-from-a-full-mysql-mysqldump-file
没有评论