Home > database >  Java project even mysql times wrong Unknown character set index for field '255' received t
Java project even mysql times wrong Unknown character set index for field '255' received t

Time:10-09

Java project even mysql times wrong: Java SQL. SQLException: Unknown character set index for field '255' received from the server.

Mysql version 8.0.12, jars mysql connector - Java - 8.0.12. Jar

Mysql code are utf8:


Establish a connection url also specifies the utf8:
Url="JDBC: mysql://localhost: 3306/XXX? useUnicode=true& CharacterEncoding=utf8 ";

What reason be excuse me

CodePudding user response:

https://blog.csdn.net/qq_38674645/article/details/81105266
Version of the problem

CodePudding user response:

But my jar package is official website of the latest

CodePudding user response:

reference 1st floor mingqing6364 response:

https://blog.csdn.net/qq_38674645/article/details/81105266Version problem

But my jar package is official website of the latest

CodePudding user response:

Blogger, if your jars and MySQL is matching, is the latest and that one reason is that you may or may not be true Reference to the latest jar package, although your Reference Libraries under the show have imported the latest jars, but because the old version of the Reference jar package configuration file or configuration class is such ". DB_CLASS_NAME=com. MySQL. JDBC Driver ", and the new jar drive packages of Driver class is in the jar package called com. The MySQL. Cj. JDBC package, the new jars have one more cj, therefore may be due to your configuration file or configuration class referenced in the Driver is missing a ". "cj, cause there is no real Reference to the latest jar packages, report the error, the solution is plus." cj ", from ". DB_CLASS_NAME=com. MySQL. JDBC Driver "instead of" DB_CLASS_NAME=com. MySQL. Cj. JDBC. Driver ".
  • Related