rami2076 / kotlin-on-spring-boot

Sample of Kotlin on Spring Boot.
MIT License
0 stars 0 forks source link

mysql DBMSの設定でutf8mb4で統一するように変更すること #33

Open rami2076 opened 11 months ago

rami2076 commented 11 months ago

charsetが異なる箇所がいくつか存在するので修正を行うこと. my.confをdocker-compose.yamlのvolumeでコピーする設定を追加することで解決可能と見られるその際,その他の設定についても移すこと.

sh-4.4# mysql -uroot -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 13
Server version: 8.1.0 MySQL Community Server - GPL

Copyright (c) 2000, 2023, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show variables like "chara%";
+--------------------------+--------------------------------+
| Variable_name            | Value                          |
+--------------------------+--------------------------------+
| character_set_client     | utf8mb4                        |
| character_set_connection | utf8mb4                        |
| character_set_database   | utf8mb4                        |
| character_set_filesystem | binary                         |
| character_set_results    | utf8mb4                        |
| character_set_server     | utf8mb4                        |
| character_set_system     | utf8mb3                        |
| character_sets_dir       | /usr/share/mysql-8.1/charsets/ |
+--------------------------+--------------------------------+
8 rows in set (0.00 sec)

mysql> 
rami2076 commented 11 months ago

以下のmb4が必要かも合わせて確認すること. 時間がかかる場合は分割すること.

    environment:
      - 'LANG=ja_JP.UTF-8mb4'