No matter what I set in the my.ini option file, when I type "show variables"
at the command line I get the following result:

character_set_client     | latin1
character_set_connection | latin1
character_set_database   | utf8
character_set_results    | latin1
character_set_server     | utf8
character_set_system     | utf8
collation_connection     | latin1_swedish_ci
collation_database       | utf8_general_ci
collation_server         | utf8_general_ci


I want ALL character sets everywhere to be utf8 at all times.  I also want
all collations to be utf8_general_ci everywhere and at all times.

If I start the command line client like this:

>> mysql -uroot --default-character-set=utf8 -p

Then I get the result that I want.  That is, ALL relevant variables are set
to utf8 or utf8_general_ci.

My question: how do I set the default character set in the options file?
What do I have to do to set everything to utf8 once and for all?

I have tried the variations listed below in the options file, and they don't
work.  I have tried them all individually and in combination.  The only
option seems to be setting the default character set at the command line,
but I just don't want to have to do this every time, and it won't solve the
illegal collation problems I get when I try to connect through JDBC (setting
the characterEncoding variable to utf8 in the JDBC url doesn't seem to fix
the problem either.).

[mysqld]
default-character-set=utf8
character-set-client=utf8
character-set-connection=utf8
character-set-results=utf8
collation-connection=utf8_general_ci

[client]
default-character-set=utf8
character-set-client=utf8
character-set-connection=utf8
character-set-results=utf8
collation-connection=utf8_general_ci

[mysql]
default-character-set=utf8
character-set-client=utf8
character-set-connection=utf8
character-set-results=utf8
collation-connection=utf8_general_ci

[mysql-4.1.14]
default-character-set=utf8
character-set-client=utf8
character-set-connection=utf8
character-set-results=utf8
collation-connection=utf8_general_ci

[mysql-4.1.14-nt]
default-character-set=utf8
character-set-client=utf8
character-set-connection=utf8
character-set-results=utf8
collation-connection=utf8_general_ci

[mysql.server]
default-character-set=utf8
character-set-client=utf8
character-set-connection=utf8
character-set-results=utf8
collation-connection=utf8_general_ci

Given that none of the following options being set in the options file has
any effect on the results of the show variables command, how do I get all my
character sets set to utf8 at startup?

You are probably thinking that I am playing with the wrong options file, but
I am not.  I have double checked, and changing other variables in the same
options file does result in variables actually changing.

I am running mysql 4.1.14-nt on Windows XP.

Thanks for your help.

Jon


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to