1.设置编码为UTF-8
set character_set_client = utf8; set character_set_server = utf8; set character_set_connection = utf8; set character_set_database = utf8; set character_set_results = utf8; set collation_connection = utf8_general_ci; set collation_database = utf8_general_ci; set collation_server = utf8_general_ci;
2.设置表为UTF-8
alter table tb_anniversary convert to character set utf8;
3.另外新建数据库时,设置库为UTF-8
create database app_relation character set utf8;
时间: 2024-10-24 20:56:02