Now, how do I alter the mysqld environment: All of the following in the my.cnf fail:
# character-set-client =utf8
# character-set-connection =utf8
# character-set-database =utf8
# set-variable = character_set_filesystem =binary
# set-variable = character_set_results =utf8
# set-variable = character_set_server =utf8
# set-variable = character_set_system =utf8
# set-variable = character_sets_dir =/usr/share/mysql/charsets/
# collation-connection =utf8_general_ci
# collation-database = utf8_general_ci
# collation-server = utf8_general_ci
Update: (THREAD SOLVED)
Ok, let's check your current configuration:
$ mysql
> SHOW VARIABLES;
You probably see lots of "latin1" for variables with a charset_* prefix. These are common defaults.
You might want to change this. Compare the
manual to understand what we do now.
You can set the MySQL config variables globally in the my.cnf config file, with:
[mysqld]
...
init_connect="SET collation_connection = utf8_general_ci"
init_connect="SET NAMES utf8"
default-character-set = utf8
character-set-server = utf8
collation-server = utf8_general_ci
[client]
default-character-set = utf8
[mysqldump]
...
default-character-set = utf8
Or you can do this on a "per connection" basis.
For example, when you use DBI and MySQL, set
mysql_enable_utf8 to a true value via the extra params passed to the driver upon connection.
(This thread is marked as being solved, as I found out, most problems similar to the described one here are coming from the MySQL server being in default/latin1 mode while you try to have everything else in your pipeline in utf8. Changing this last element to utf8 solves it.)