Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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


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?

share|improve this question

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:


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.

share|improve this answer
Yeah, what I would call a section (i.e. [mysqld] or [client]) is referred to as a group in MySQL-speak: – 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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.