I exported 2 identical databases(identical in terms of names and structures of tables) into two .sql files using mysqldump. I want to merge them into one file. However, both the
All you need is add --skip-add-drop-table option when using mysqldump.
--skip-add-drop-table
mysqldump
$ mysqldump --databases --skip-add-drop-table -u root db1 > /tmp/qqq.2
So, there would not DROP TABLE IF EXISTS in sql files.
DROP TABLE IF EXISTS
sql
see docs of mysql on --skip-add-drop-table