mysql编码问题

一、关于group 报错(only_full_group_by和sql_mode不匹配)

only_full_group_by出现在select字段后面的只能是group by后面的分组字段,或使用聚合函数包裹着的字段

1.查看sql_mode 信息

select@@sql_mode;

2.将值复制到my.cnf(即在mysql的配置文件),去掉only_full_group_by

二、 Illegal mix of collations (utf8_general_ci,COERCIBLE,IMPLICIT) and (utf8_unincode _ci,COERCIBLE) for operation“=“

两种表的编码格式不匹配

将第二张表b改为相同编码格式

alter table b convert 同charset utf8 collate utf8_general_ci;

posted @ 2022-10-13 20:57  mushangqiujin  阅读(9)  评论(0)    收藏  举报  来源