Reference

MySQL default-character-set is Deprecated in Windows Event Log

Current versions of MySQL 5.1.x appear to ship with an outdated default configuration file that generates the warnings in the Windows Event Log.

Tags: database mysql windows

Overview

The following warning may appear in the Windows Event Log when restarting the MySQL service:

The syntax ‘–default-character-set’ is deprecated and will be removed in a future release. Please use –character-set-server instead.

Solution

Perform the following steps to prevent the warning:

  1. Open the MySQL configuration file,
    i.e. C:\Program Files\MySQL\MySQL Server 5.1\my.ini
  2. In the [mysqld] section change the line default-character-set=utf8 to character-set-server=utf8
  3. Save the file and restart the MySQL service.

If you use a character set other than UTF8, enter the corresponding value. Do not modify the default-character-set setting in the [mysql] section of the configuration file as it will break mysql.exe.

Related Resources

A solution to this problem was first posted in the MySQL Bug Tracker.