How to set the default connection collation in config file?
Posted by: damjan
Date: August 21, 2005 10:44AM

I'm using mysql-4.1.11 on Linux, and I've sucessfully setup the database to be all utf-8. But I also need to use the utf8_unicode_ci collation (instead of the default for utf8 utf8_general_ci).

This is how I've setup my /etc/my.cnf file:
[client]
default-character-set=utf8

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

With this setup everything is ok except that when I connect with the mysql cli tool, the connection collation is set to "utf8_general_ci".

mysql> show session variables like '%collation_connection%';
+----------------------+-----------------+
| Variable_name | Value |
+----------------------+-----------------+
| collation_connection | utf8_general_ci |
+----------------------+-----------------+

What do I need to put in my.cnf so that the default collation for the connection is "utf8_unicode_ci"?

I tried default-collation=utf8_unicode_ci, collation=utf8_unicode_ci, collation_connection=utf8_unicode_ci, but not one of those options are accepted by the mysql tool.

Options: ReplyQuote


Subject
Views
Written By
Posted
How to set the default connection collation in config file?
41913
August 21, 2005 10:44AM


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.