问题描述 :
SELECT distinct a.user_id INTO userID FROM authorization_record a WHERE a.open_id = openId AND a.auth_type = '5001'
错误如下:
[Err]1267- Illegal mixofcollations (utf8_unicode_ci,IMPLICIT)and(utf8_general_ci,IMPLICIT)foroperation'='
解决方法 :
将比较等式一边进行字符串转换,如改为“ CONVERT(b.fullCode USING utf8) COLLATE utf8_unicode_ci ”
SELECT distinct a.user_id INTO userID FROM authorization_record a WHERE a.open_id = CONVERT(openId USING utf8) COLLATE utf8_unicode_ci AND a.auth_type = '5001'
当系统服务的MySQL错误日志中,发现大量以下类似信息:经常收到客户关于通信故障错误的问题—客户面临间歇性的”Got an error reading communication packet”错误,这里分析这个错误出现的原因,以及如何解决这个问题。
下面看看官网怎么说:
Other reasons for problems with aborted connections or aborted clients:
Aborted connection情况下,这也意味着以下几个问题:
当然,也可能是其它原因导致的。坦白讲,异常中断是很难诊断的,也有可能是和网络、防火墙有关。
如果log_warnings的值大于1,mysql会将类似信息写入错误日志:
可以修改一下log_waring的值:
但这样直接修改,重启后会失效,修改配置文件mysql.cnf log_warnings = 1
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)