Skip to content

Instantly share code, notes, and snippets.

@dungdt88
Created December 17, 2015 09:53
Show Gist options
  • Save dungdt88/6d026a06b52338ec64a4 to your computer and use it in GitHub Desktop.
Save dungdt88/6d026a06b52338ec64a4 to your computer and use it in GitHub Desktop.
Convert UTF8 to UTF8mb4 in MySQL to support utf8 4 bytes
ALTER TABLE `{some_table}` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `{some_table}` CHANGE COLUMN `{some_column}` `{some_column}` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment