We have several MySQL
backup files of a database in *.SQL
format and we want to restore the database by using these files. However, as the sql files contains "DROP TABLE"
definitions, running one script cause to remove the data created by the previous script. In addition to these sql files, we have also some other backup folders containing *.FRM
and *.MYD
files. In all of two cases I think these backups are Differential
or Incremental
and we have to merge/combine all of them. If so, how can we combine them without losing data? As I have no experience on MySQL
, could you explain a way by using MySQL Workbench
if it is possible? Thanks in advance.
Some lines from one of the sql file:
DROP TABLE IF EXISTS `BLACKLIST`;
CREATE TABLE `BLACKLIST` (
`ID` int(11) NOT NULL auto_increment,
`NAME` varchar(30) NOT NULL,
`SURNAME` varchar(30) NOT NULL,
PRIMARY KEY (`ID`),
UNIQUE KEY `BLACKLISTINDEX` (`NAME`,`SURNAME`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP
.mysqldump --skip-add-drop-table
-- see dev.mysql.com/doc/refman/5.6/en/mysqldump.html You may also want--no-create-info --no-create-db
. This does not solve your immediate problem; an editor is needed.