文章詳情頁
java - mysql的collation混用問題如何解決;
瀏覽:137日期:2022-06-11 15:53:15
問題描述
我使用Spring JPA對數(shù)據(jù)庫mysql進(jìn)行操作,一開始創(chuàng)建數(shù)據(jù)庫時(shí)已經(jīng)設(shè)定default-character-set=utf8mb4default-collation=utf8mb4_general_ci但是運(yùn)行之后仍然報(bào)錯(cuò):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
相關(guān)文章:
1. nginx - 如何根據(jù)服務(wù)器配置設(shè)置web服務(wù)參數(shù)?2. 用CSS3 box-sizing 屬性實(shí)現(xiàn)兩個(gè)并排的容器,如果想讓容器中間有間隔該如何實(shí)現(xiàn)3. javascript - table固定尾行,有人寫過嗎?4. css - label文字居中5. pdo - mysql 簡單注入疑問6. javascript - js輸入框限定字?jǐn)?shù)問題7. 為什么學(xué)習(xí)PHP8. javascript - vue項(xiàng)目里的package.json9. css3 - <img>圓角屬性在手機(jī)瀏覽器顯示不全10. python - 關(guān)于爬取網(wǎng)站,下載圖片的時(shí)候碰到網(wǎng)址結(jié)構(gòu)問題卡住
排行榜

熱門標(biāo)簽