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 […]
Fix MySQL Slave Replication Error
August 6, 2015
Occasionally my mysql mirror server will crash or the power will go off on it since it’s not mission critical, it’s not on a UPS. Typically I’d use this “opportunity” to build a new mysqldump or rsync the live mysql database folder and start a new mirror, but that takes a whack of time that […]