Re: In fully utf8 unicode MySQL the collation connection makes trouble
Posted by: voter viparmenia
Date: September 21, 2009 04:00AM

Rick James Wrote:
-------------------------------------------------------
> I doubt if the socket issue is connected to the
> charset change.
>
> SET NAME utf8; immediately after connecting.
>
> Try connecting using the hostname.


Thanks for Tip I will try that solutin too.
Just to escape the problem I am using in my.cnf under
[mysqld]
skip-character-set-client-handshake
init_connect='SET DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci'

As well explicitly 'SET COLLAT utf8_unicode_ci' during connection.

But what is wondering me, without that extra hardcoded settings, the simple mysql connection to server shows everything ok
SHOW SESSION VARIABLES LIKE "%coll%";
+----------------------+-----------------+
| Variable_name | Value |
+----------------------+-----------------+
| collation_connection | utf8_unicode_ci |
| collation_database | utf8_unicode_ci |
| collation_server | utf8_unicode_ci |
+----------------------+-----------------+
3 rows in set (0.00 sec)

mysql> SHOW VARIABLES LIKE "%coll%";
+----------------------+-----------------+
| Variable_name | Value |
+----------------------+-----------------+
| collation_connection | utf8_unicode_ci |
| collation_database | utf8_unicode_ci |
| collation_server | utf8_unicode_ci |
+----------------------+-----------------+
3 rows in set (0.00 sec)

mysql> SHOW GLOBAL VARIABLES LIKE "%coll%";
+----------------------+-----------------+
| Variable_name | Value |
+----------------------+-----------------+
| collation_connection | utf8_unicode_ci |
| collation_database | utf8_unicode_ci |
| collation_server | utf8_unicode_ci |
+----------------------+-----------------+
3 rows in set (0.00 sec)

everywhere the right collation to be seen, but when i am generating any tabe without extra definition of collation, it is generated using as default utf8_general_ci.

Where is this utf8_general_ci hided, that clients connecting to server see that and not what is set as variable?

Why is utf8_general_ci appears when one not explicitly setting the collation as utf8_unicode_ci?

For instance phpMyAdmin says:
collation connection utf8_general_ci
(Global Value) utf8_unicode_ci

Or is this really hardcoded during compilation of MySQL from source and there is no way to put in my.cnf any definition anywhere and change DEFAULT collation connection?
Is this still a unsolved bug like it explained here http://bugs.mysql.com/bug.php?id=34980



Edited 3 time(s). Last edit at 09/21/2009 04:23AM by voter viparmenia.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: In fully utf8 unicode MySQL the collation connection makes trouble
5267
September 21, 2009 04:00AM


Sorry, you can't reply to this topic. It has been closed.

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.