16
24

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.

Amazon RDS(MySQL)でutf8mb4を使いたい場合の設定

Posted at

ちょいちょい忘れるのでメモ。

パラメータグループで下記を設定

character_set_client:utf8mb4
character_set_connection:utf8mb4
character_set_database:utf8mb4
character_set_results:utf8mb4
character_set_server:utf8mb4
innodb_large_prefix:1
innodb_file_format:Barracuda
innodb_file_per_table:1

確認

DB再起動してshow variables like 'character_set%';叩いて変わってればOK

その他

上記設定後、character_set_databaseがlatin1になってしまう現象があったが、下記で解決。
ALTER DATABASE dbname default character set utf8mb4;

16
24
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
16
24

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?