2 qq 36930706 qq_36930706 于 2017.09.11 18:31 提问

mysql:LIKE '%唐%'报错了

[Err] 1267 - Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation 'like'好像是数据库字符集的问题
set character_set_client=utf8;

set character_set_connection=utf8;

set character_set_database=utf8;

set character_set_results=utf8;

set character_set_server=utf8;

set character_set_system=utf8;
用命令在mysql上修改了原来的gbk,但是关闭重启后数据库字符集有变回来了,求大神指导

2个回答

huang931027
huang931027   2017.09.12 08:52
已采纳

把你的SQL贴出来吧,万一不是字符集的问题呢

qq_36930706
qq_36930706   2017.09.12 09:39

sql语句:select * from rep_daily_data_promoter where 1 = 1 and promoter_uid like '%唐%';

Csdn user default icon
上传中...
上传图片
插入图片