1.修改字段的字符编码
ALTER TABLE table_name MODIFY COLUMN column_name VARCHAR(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT “” COMMENT ‘字段备注’;
2.在‘=’左边或者右边加上字符编码描述COLLATE utf8mb4_general_ci
select a.userid,b.nickname,a.createdate,a.praisetimes from wenxue_dynamic.dynamic_comment a left join wenxue_user.userinfo b on a.userid COLLATE utf8mb4_general_ci =b.userid where a.typeid='1910292038501101499' and a.commentid='' order by a.createdate asc;