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