搜尋

首頁  >  問答  >  主體

java - mysql的collat​​ion混用問題如何解決;

我使用Spring JPA對資料庫mysql進行操作,一開始建立資料庫時已經設定
default-character-set=utf8mb4
default-collat​​ion=utf8mb4_general_ci
但是運行之後仍然會報錯:
java.sql.SQLException: Illegal mix of collat​​ions (utf8mb4_general_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='

ringa_leeringa_lee2815 天前867

全部回覆(1)我來回復

  • 曾经蜡笔没有小新

    曾经蜡笔没有小新2017-06-06 09:54:28

    客戶端資料庫連接串配置了沒有?

    jdbc.url=jdbc:mysql://localhost/test?characterEncoding=utf8mb4

    回覆
    0
  • 取消回覆