Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Aug 2011 13:27:08 +0200
From:      Miroslav Lachman <000.fbsd@quip.cz>
To:        ale@FreeBSD.org
Cc:        ports@FreeBSD.org
Subject:   FreeBSD Port: mysql-server-5.5.15
Message-ID:  <4E4A540C.8010503@quip.cz>

next in thread | raw e-mail | index | archive | help
Hi,

I am trying MySQL 5.5.15 as it is the default version now, but I have a 
problem with default charset.
I used WITH_CHARSET=utf8 WITH_XCHARSET=all WITH_COLLATION=utf8_czech_ci 
on all our older MySQL servers (5.0 and 5.1). These knobs are no longer 
available, so how can I set default charset and collation?

I tried following in my.cnf

[client]
default-character-set = utf8

[mysqld]
character-set-server = utf8
collation-server     = utf8_czech_ci

But it gives me

mysql> SHOW VARIABLES LIKE '%collation%';
+----------------------+-----------------+
| Variable_name        | Value           |
+----------------------+-----------------+
| collation_connection | utf8_general_ci |
| collation_database   | utf8_czech_ci   |
| collation_server     | utf8_czech_ci   |
+----------------------+-----------------+

mysql> SHOW VARIABLES LIKE '%character%';
+--------------------------+----------------------------------+
| Variable_name            | Value                            |
+--------------------------+----------------------------------+
| character_set_client     | utf8                             |
| character_set_connection | utf8                             |
| character_set_database   | utf8                             |
| character_set_filesystem | binary                           |
| character_set_results    | utf8                             |
| character_set_server     | utf8                             |
| character_set_system     | utf8                             |
| character_sets_dir       | /usr/local/share/mysql/charsets/ |
+--------------------------+----------------------------------+


On an older versions (compiled with WITH_ knobs) I have:


mysql> SHOW VARIABLES LIKE '%collation%';
+----------------------+---------------+
| Variable_name        | Value         |
+----------------------+---------------+
| collation_connection | utf8_czech_ci |
| collation_database   | utf8_czech_ci |
| collation_server     | utf8_czech_ci |
+----------------------+---------------+

mysql> SHOW VARIABLES LIKE '%character%';
+--------------------------+----------------------------------+
| Variable_name            | Value                            |
+--------------------------+----------------------------------+
| character_set_client     | utf8                             |
| character_set_connection | utf8                             |
| character_set_database   | utf8                             |
| character_set_filesystem | binary                           |
| character_set_results    | utf8                             |
| character_set_server     | utf8                             |
| character_set_system     | utf8                             |
| character_sets_dir       | /usr/local/share/mysql/charsets/ |
+--------------------------+----------------------------------+

Note the difference in collation_connection!

Is there any official way to restore the old behavior, or should I 
locally modify the port to support WITH_ knobs?

It seems related to this bug: http://bugs.mysql.com/bug.php?id=34980

Thanks in advance

Miroslav Lachman



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4E4A540C.8010503>