Top Nav

Force MySQL to UTF-8 Encoding

Recently learned that mysql-proxy does to issue SET statements to read-only slaves when doing read/write splitting. This create a problem when the client wants to set the character set. The work around is to force all connections to the server to the desired character set which in this case is UTF-8. Add the following lines to the “[mysqld]” section of /etc/my.cnf on the server: