The mysql manual says that SET NAMES 'x' is equivalent to
SET character_set_client = x;
SET character_set_results=x;
SET character_set_connection=x;
According to my config file for SERVER variables, I have all three of these set to utf8.
However, if I actually do a SHOW VARIABLES %character_set%, it shows the wrong character sets for connection, client, results, and server. This means I have to use the SET NAMES command for each connection.
I'm obviously doing something wrong, probably something simple, but it's got me stumped. Any ideas?