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:
None 
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

[17 Dec 2010 1:55] HOSHNIO Takashi
Description:
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.
mysql-5.5.8-linux2.6-x86_64.tar.gz
MD5: 1e44ae5175158b6740e0224e7a004f42

my.cnf
[client]
default-character-set = utr8mb4
[mysqld]
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 \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DWITH_DEBUG=1

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
[client]
default-character-set = utr8mb4
[mysqld]
character-set-server = utf8mb4
EOF
> ./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:

my.cnf:
[mysqld]
...
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:

[client]
default-character-set = utr8mb4

It should be:

[client]
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.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.040 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.