最后,设置数据库的字符编码为utf8或utf8mb4。如果您选择utf8,可以使用以下命令: ALTER DATABASE database_name CHARACTER SET utf8; 1. 如果您选择utf8mb4,可以使用以下命令: ALTER DATABASE database_name CHARACTER SET utf8mb4; 1. 序列图 下面是一个示例序列图,展示了创建数据库时选择utf8还是utf8mb4...
jdbc的连接字符串不支持utf8mb4,这个 这种方式 来解决的,如果服务器端设置了character_set_server=utf8mb4,则客户端会自动将传过去的utf-8视作utf8mb4。Connector/J did not support utf8mb4 for servers 5.5.2 and newer.Connector/J now auto-detects servers configured with character_...
| character_set_connection | utf8 | | character_set_database | utf8mb4 | | character_set_filesystem | binary | | character_set_results | utf8 | | character_set_server | utf8mb4 | | character_set_system | utf8 | | character_sets_dir | D:\mysql\share\charsets\ | +---+---...