Last active
December 19, 2024 07:25
-
-
Save zaifastafa/79435a44930ed73b89535a294912386b to your computer and use it in GitHub Desktop.
For removing DEFINER clause from mysql dump
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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