search

Home  >  Q&A  >  body text

java - How to solve the problem of mixed collation of mysql;

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_leeringa_lee2787 days ago846

reply all(1)I'll reply

  • 曾经蜡笔没有小新

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

    Has the client database connection string been configured?

    1

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

    reply
    0
  • Cancelreply