Skip to content

Instantly share code, notes, and snippets.

@zaifastafa
Last active December 19, 2024 07:25
Show Gist options
  • Save zaifastafa/79435a44930ed73b89535a294912386b to your computer and use it in GitHub Desktop.
Save zaifastafa/79435a44930ed73b89535a294912386b to your computer and use it in GitHub Desktop.
For removing DEFINER clause from mysql dump
-- definer
sed -i 's/DEFINER=[^*]*\*/\*/g' filename.sql
-- fix for generated columns re-import
sed -i 's/COLLATE.*GENERATED ALWAYS/GENERATED ALWAYS/g' dump.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment