Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save raven-rock/a7ea59ea40a5b8189811d5cc20b3a9f8 to your computer and use it in GitHub Desktop.

Select an option

Save raven-rock/a7ea59ea40a5b8189811d5cc20b3a9f8 to your computer and use it in GitHub Desktop.
Change MySQL character set and collation of existing table
-- UTF8mb4, case insensitive
ALTER TABLE my_table CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
-- Latin1, Swedish case insensitive
ALTER TABLE my_table CONVERT TO CHARACTER SET latin1 COLLATE latin1_swedish_ci;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment