文章詳情頁
java - mysql的collation混用問題如何解決;
瀏覽:104日期:2022-06-11 15:53:15
問題描述
我使用Spring JPA對數(shù)據(jù)庫mysql進行操作,一開始創(chuàng)建數(shù)據(jù)庫時已經設定default-character-set=utf8mb4default-collation=utf8mb4_general_ci但是運行之后仍然報錯:java.sql.SQLException: Illegal mix of collations (utf8mb4_general_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation ’=’
問題解答
回答1:客戶端數(shù)據(jù)庫連接串配置了沒有?
jdbc.url=jdbc:mysql://localhost/test?characterEncoding=utf8mb4
相關文章:
1. android-studio - Android Studio 運行項目的時候一堆警告,跑步起來???2. dockerfile - [docker build image失敗- npm install]3. mysql - 新浪微博中的關注功能是如何設計表結構的?4. angular.js使用$resource服務把數(shù)據(jù)存入mongodb的問題。5. 如何解決Centos下Docker服務啟動無響應,且輸入docker命令無響應?6. angular.js - 關于$apply()7. MySQL數(shù)據(jù)庫中文亂碼的原因8. 表單提交驗證,沒反應,求老師指點9. nignx - docker內nginx 80端口被占用10. angular.js - Ionic 集成crosswalk后生成的apk在android4.4.2上安裝失?。???
排行榜

熱門標簽