Illegal mix of collations
2792 ワード
データベース・ライブラリ・テーブルの符号化フォーマットによる競合;
Solution:テーブルのエンコーディングを変更する
Reffered:http://blog.csdn.net/love_legain/article/details/79004485
Stacktrace
Caused by: java.sql.SQLException: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='
Solution:テーブルのエンコーディングを変更する
ALTER TABLE CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
Reffered:http://blog.csdn.net/love_legain/article/details/79004485
Stacktrace
### Error updating database. Cause: java.sql.SQLException: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='
### The error may involve com.stylefeng.guns.common.persistence.dao.SearchParamMapper.timesIncremental-Inline
### The error occurred while setting parameters
### SQL: UPDATE guns.`search_param` SET times = (1 + times) WHERE parameter = ?
### Cause: java.sql.SQLException: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='
; uncategorized SQLException for SQL []; SQL state [HY000]; error code [1267]; Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='; nested exception is java.sql.SQLException: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:84)
...............