37
40

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

【MySQL】バージョン5.5.3以降の文字コードの設定(UTF8)

Last updated at Posted at 2014-01-08

mysql5.5.3からは[mysqld]の文字コードの設定は、default-character-set=utf8は使えなくなり、character-set-server=utf8を使う。

※5.1でもdefault-character-setは非推奨なので、character-set-serverを使った方が良いかもしれない。

[mysqld]以外はdefault-character-set=utf8を使う。

設定ファイル
[mysqld]
character-set-server=utf8

[mysql]
default-character-set=utf8

[mysqldump]
default-character-set=utf8

参考
option_mysqld_default-character-set
option_mysqld_character-set-server

文字コードの変更を反映するには、データベースを作り直さないといけないらしいので、初期設定で文字コードの設定は忘れずに。

37
40
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
37
40

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?