[ERROR] mysql\bin\mysqld.exe: unknown variable ‘default-character-set=utf8’


 


ん???

Windows 7上でXAMPPの環境作ってMySQL起動しようとしたのだが、エラーで起動しない。

mysql_error.logを見ると、

[ERROR] mysql\bin\mysqld.exe: unknown variable ‘default-character-set=utf8’

とある。

[mysqld]セクションに”default-character-set = utf8″を追記していたのだが、これがまずかった模様。
MySQL 5.5からは、サーバ側の文字コード指定の標記が変更になったらしい。

You can change the default server character set and collation with the –character-set-server and –collation-server options when you start the server.
https://dev.mysql.com/doc/refman/5.5/en/charset-configuration.html

というわけで、my.ini中の[mysqld]セクションの最後の方で

character-set-server=utf8

としたらサーバ起動できた。

This entry was posted in MySQL. Bookmark the permalink. Both comments and trackbacks are currently closed.

関連記事