MySQL import - How to ignore Drop table if exists line?

后端 未结 3 1798
走了就别回头了
走了就别回头了 2021-02-13 12:57

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

3条回答
  •  滥情空心
    2021-02-13 13:13

    I guess I don't see why a DROP TABLE statement should be problematic or why you need to merge dumps for two IDENTICAL databases.

    That being said, you should probably just not add DROP TABLE in the initial dump. This would be controlled via flag use in your mysqldump command as noted in the documention at http://dev.mysql.com/doc/refman/5.5/en/mysqldump.html

    This probably means you need to use --skip-opt flag if you were using default options (default is to run as if --opt flag is passed). You will then need to specify all flags within --opt that you still want to use.

提交回复
热议问题