How can I permanently change collation_server to utf8_unicode_ci, not utf8_general_ci?
Posted by: Yurii Kartsev
Date: October 27, 2006 12:53AM

Good day, MySQL gurus!

I've spent a whole day solving this problem...

Everything started from one error while calling a stored procedure: "Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT)".
And(!IMPORTANT!), the data in all tables (as using EMS MySQL Manager, as using PhpMyAdmin), was right, I mean, readable well.
Well, I read some forums, searched and found out the reason: values of three important variables should NOT be different. but it were:

collation_connection: utf8_unicode_ci
collation_database: utf8_unicode_ci
collation_server: utf8_general_ci

In plus, all tables and its columns were with collate option utf8_unicode_ci.

I didn't and don't know how to change collation_server to utf8_unicode_ci, so I've decided just to change other variables and tables into utf8_general_ci. I read that these two formats are always the same but utf8_general_ci- is faster, and utf8_unicode_ci is made by standart. So U changed all tables and columns in utf8_general_ci and my variables too, it became:

collation_connection: utf8_general_ci
collation_database: utf8_general_ci
collation_server: utf8_general_ci

After that I call this stored procedure - no problem and no errors. !BUT! now all the result data(as using EMS MySQL Manager, as using PhpMyAdmin) are now hieroglyphs. I can't understand what's the reason, but I assume that it's because ot those standarts, I assume that all these variables and tables with columns should be set in utf8_unicode_ci. Am I right here?


Then comes my question: HOW to change collation_server to utf8_unicode_ci? I can make it using SET, but it will be only for current session. But how can I change it forever, in servers settings? I can configure MySQL server through Programs->MySQL Server 5.0 -> MySQL Server Instance Configure Wizard, but there is only just "utf8" can be selected, no any "general" or "unicode". And when I choose utf8 - it makes utf8_general_ci.


I hope that somebody answere VERY much... I really need your help.


Thank you in advance very much.

P.S.: All important variables are set in utf8, here it is:

character_set_client utf8
character_set_connection utf8
character_set_database utf8
character_set_results utf8
character_set_server utf8
character_set_system utf8


P.P.S.: I really searched a lot of forums and nobody knows the answer... That's why I wrote here.

Options: ReplyQuote


Subject
Views
Written By
Posted
How can I permanently change collation_server to utf8_unicode_ci, not utf8_general_ci?
22376
October 27, 2006 12:53AM


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.