java - How to solve the problem of mixed collation of mysql;
ringa_lee
ringa_lee 2017-06-06 09:52:28
0
1
734

I use Spring JPA to operate the database mysql. I have set it when I first created the database.
default-character-set=utf8mb4
default-collation=utf8mb4_general_ci
But I still get an error after running:
java.sql.SQLException: Illegal mix of collations (utf8mb4_general_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='

ringa_lee
ringa_lee

ringa_lee

reply all (1)
曾经蜡笔没有小新

Has the client database connection string been configured?

jdbc.url=jdbc:mysql://localhost/test?characterEncoding=utf8mb4
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!