mysql utf8mb4 设置

时间:2023-11-14 17:20:26

[mysqld]
collation-server=utf8mb4_general_ci
init-connect='SET NAMES utf8mb4'
character-set-server=utf8mb4
skip-character-set-client-handshake
sql_mode="STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"

[client]
default-character-set=utf8mb4

[mysql]
default-character-set=utf8mb4