Bug #58990 character-set-server defined in configuration file does not work.
Submitted: 17 Dec 2010 1:55 Modified: 24 Dec 2010 0:41
Reporter: HOSHNIO Takashi Email Updates:
Status: Not a Bug Impact on me:
Category:MySQL Server: Charsets Severity:S3 (Non-critical)
Version:5.5.8 OS:Linux (Ubuntu 10.04.1 x86_64)
Assigned to: CPU Architecture:Any
Triage: Needs Triage: D5 (Feature request)

[17 Dec 2010 1:55] HOSHNIO Takashi
Configuration parameter character-set-server does not take effect when 
it is defined in my.cnf file.
It's work fine by setting as command-line option.

This happens using official binary.
MD5: 1e44ae5175158b6740e0224e7a004f42

default-character-set = utr8mb4
character-set-server = utf8mb4

status output:
Server characterset:    latin1
Db     characterset:    latin1
Client characterset:    utf8
Conn.  characterset:    utf8

I could not reproduce the problem with my own build.

Environment: Ubuntu server 10.04.1 x86_64
Compiler: gcc 4.4.3
Build configuration:
env \
CC=gcc \
CFLAGS='-static-libgcc -O3 -m64 -mtune=core2' \
CXX=gcc \
CXXFLAGS='-static-libgcc -O3 -m64 -mtune=core2 -felide-constructors -fno-exceptions -fno-rtti' \
cmake \
-DBUILD_CONFIG=mysql_release \

How to repeat:
> cd /usr/local
> tar xzf mysql-5.5.8-linux2.6-x86_64.tar.gz
> mv mysql-5.5.8-linux2.6-x86_64 mysql
> cat > etc/my.cnf <<EOF
default-character-set = utr8mb4
character-set-server = utf8mb4
> ./scripts/mysql_install_db
> ./bin/mysqld_safe&
> echo 'status;' |mysql -u root
[17 Dec 2010 7:40] Susanne Ebrecht
Many thanks for writing a bug report.

You can't set utf8mb4 at default character set.
[22 Dec 2010 9:11] Susanne Ebrecht
Many thanks for writing a bug report.

My tests show that it works well:

character-set-server = utf8mb4

Restart server
Connect to server
SHOW VARIABLES LIKE 'character_set_server';
=> utf8mb4
[22 Dec 2010 9:41] Alexander Barkov
There is a typo in the original report:

default-character-set = utr8mb4

It should be:

default-character-set = utf8mb4

(notice "utr" vs "utf")

This typo might be the source of the problem.
[24 Dec 2010 0:41] HOSHNIO Takashi
Sorry, this is not a bug. My configuration was wrong.
I confirmed the setting works with the official binary and correct configuration file.

Thank you.