1. 建表时设置默认字符串编码方式为utf8
create table test() default charset = utf8;
2. 已经添加的表需要设置一下:
alter table test convert to character set utf8 collate utf8_unicode_ci;
3. 直接修改数据库的字符串编码属性
alter DATABASE test character set utf8 collate utf8_unicode_ci;
1. 建表时设置默认字符串编码方式为utf8
create table test() default charset = utf8;
2. 已经添加的表需要设置一下:
alter table test convert to character set utf8 collate utf8_unicode_ci;
3. 直接修改数据库的字符串编码属性
alter DATABASE test character set utf8 collate utf8_unicode_ci;