I have one database that needs to be converted from latin_1
to utf8
. This conversion is no problem and in my staging environments, everything works correctly when I add to my.cnf the lines (as suggested in this SO question):
[client]
default-character-set = utf8
[mysqld]
collation-server = utf8_unicode_ci
init-connect='SET NAMES utf8'
character-set-server = utf8
And run the appropriate ALTER statements:
ALTER TABLE {row} CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;
Unfortunately, this database doesn't sit on the MySQL server alone. It shares the server with a couple databases still using the latin_1
encodings and these databases really have no need to be utf8
. Can I have different encodings share the same server and do I need to alter the default configuration to do this? Or is this asking for trouble?