3 ms·
Use utf8mb4. Use utf8mb4_unicode_520_ci. Alter tables using ALTER TABLE database_name.table_name CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_c
by VintageCool 9y ago
Use utf8mb4. Use utf8mb4_unicode_520_ci. Alter tables using
ALTER TABLE database_name.table_name CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci.
Verify that all of your columns are utf8mb4 with:
SELECT table_schema, table_name, character_set_name, collation_name
FROM information_schema.columns
WHERE table_schema NOT IN ('mysql','information_schema','sys','performance_schema')
AND character_set_name is not NULL
AND character_set_name != 'utf8mb4';
You may have to update your client libraries (like Perl-DBD) if you're still using something like CentOS 6.