Skip to content

Instantly share code, notes, and snippets.

@amurrell
Created August 19, 2017 00:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save amurrell/69b71293f33230ca3f0773ce9346dec2 to your computer and use it in GitHub Desktop.
Save amurrell/69b71293f33230ca3f0773ce9346dec2 to your computer and use it in GitHub Desktop.
Fix collation and character set error from old mysql
# Unknown collation: 'utf8mb4_unicode_520_ci'
sed -i'.bak' "s/utf8mb4_unicode_520_ci/utf8mb4_unicode_ci/g;" file.sql
# COLLATION 'utf8_general_ci' is not valid for CHARACTER SET 'utf8mb4'
sed -i'.bak' "s/utf8_general_ci/utf8mb4_unicode_ci/g;" file.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment