Created
October 17, 2017 09:32
-
-
Save krisleech/fa08d51c206d5d4acbedabdf50016ea9 to your computer and use it in GitHub Desktop.
change encoding/collation of MySQL database/table
This file contains 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
When table/db is Latin1 and you have UTF data convert source db to UTF before import: | |
``` | |
show full columns from documents; | |
ALTER DATABASE mos_production CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | |
USE mos_production | |
ALTER TABLE documents CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment