preface
When you encounter problems, don’t ask others urgently. Unless you are in a hurry, analyzing and solving the causes of the problems yourself is an intuitive embodiment of our ability. If Baidu can’t, you can use Google.
text
Use JDBC to connect to the database. The driver loading, URL, user name and password are all correct, but you can’t connect to the database anyway. Check the error message slowly and say it’s a character set problem.
Error message
Cannot create PoolableConnectionFactory (Unknown initial character set index '255' received from server. Initial client character set can be forced via the 'characterEncoding' property.)
Original link information
jdbc:mysql://xxxxxx:3306
After modification
jdbc:mysql://xxxxxx:3306?useUnicode=true&characterEncoding=utf8
good job
Similar Posts:
- For the problem of establishing SSL connection in mysql, set usessl = false to explicitly disable SSL, or set usessl = true
- [Solved] Springboot Project Connect MYSQL Error: Establishing SSL connection without server’s identity verification is not recommended.
- Failed to obtain JDBC Connection
- [Solved] Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.6…
- Logstash output jdbc Error: java.lang.IllegalAccessError: tried to access class com.mysql.jdbc.EscapeProcessor from class com.mysql.jdbc.ConnectionImpl
- The solution of job failed to start when modifying MySQL character encoding
- [Solved] Mybatis-config Error: Cannot load connection class because of underlying exception: com.mysql.cj.exceptions.WrongArgumentException: failed to parse the connection string near ‘;useUnicode=true&
- [Solved] spark Connect hive Error: javax.jdo.JDODataStoreException: Required table missing : “`DBS`” in Catalog “” Schema “”
- SSM Project Error: java.sql.SQLException: Access denied for user ‘????…§’@’localhost’ (…
- [Solved] ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’