Skip to content

Instantly share code, notes, and snippets.

@sungmin-park
Last active May 25, 2021 11:21
Show Gist options
  • Save sungmin-park/08028882697c3c937f80bd6b877b4d84 to your computer and use it in GitHub Desktop.
Save sungmin-park/08028882697c3c937f80bd6b877b4d84 to your computer and use it in GitHub Desktop.
#!/bin/sh -e
sed -i.bak \
-e 's/DEFINER=[^ ]* / /' \
-e 's/SET @MYSQLDUMP_TEMP_LOG_BIN = @@SESSION.SQL_LOG_BIN;/ /' \
-e 's/SET @@SESSION.SQL_LOG_BIN= 0;/ /' \
-e 's/SET @@GLOBAL.GTID_PURGED='';/ /' \
-e 's/SET @@SESSION.SQL_LOG_BIN = @MYSQLDUMP_TEMP_LOG_BIN;/ /' "$1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment