Illegal mix of collations for operation 'like'

The content comes from the blog: https://www.cnblogs.com/install/p/4417527.html

 

MySQL Illegal mix of collations for operation 'like'
is above MySQL 5.5, if the field type is time, date, datetime
, if you use like '% Chinese%' in select, Illegal mix of collations for operation 'like' will appear
during programming To search for each field,
a time field like '%Chinese%' may appear during execution, and there will be
no error in the old version of MySQL. If it is
upgraded to MySQL 5.5 or above, it must be changed to like binary ' %Chinese%' to avoid errors.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325040878&siteId=291194637