mysql: set default charset to utf8

In an effort to set the default charset for a MySQL server to utf8, I've added the following options to my.ini

character-set-server=utf8
default-collation=utf8_unicode_ci


But when I start the mysql client, I get the following error message:

error: Found option without preceding group in config file: C:\dev\tools\mysql\my.ini at line: 2 Fatal error in defaults handling. Program aborted

Does anyone know what the right way to set the default charset in this config file is?

Thanks, Don

-

The problem the server complains about is that it can't find the expected INI section ([mysqld]) to which these settings belong. Ensure you've added those settings to the [mysqld] section, like this:

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


If there's already such a section there, add your settings to to that section, don't create a duplicate section.

After altering the configuration file, restart the MySQL server.

-
Yeah, what I would call a section (i.e. [mysqld] or [client]) is referred to as a group in MySQL-speak: dev.mysql.com/doc/refman/6.0/en/option-files.html –  Philip Durbin May 13 '09 at 20:21
Thanks, wasn't familiar with that terminology :) Me called it like me seen it :) –  Mihai Limbăşan May 13 '09 at 20:24