Use sed to add “DROP TABLE” to an existing mysqldump output
October 3, 2016
If I had planned ahead, I would have generated my mysqldump file with the –add-drop-table command line option to add the DROP TABLE IF EXISTS `tablename` but I didn’t, so when my 39GB mysqldump file had a Foreign key constraint error on line 34233, I would have had to generate a whole new one to […]