Solutions to errors in the final running of JDBC programming

An error is reported at the end of JDBC programming:

Exception in thread “main“ java.sql.SQLException: Unknown initial character set index ‘255‘ received

  resolvent:

When establishing a connection between JDBC and the database, add the following after the URL:

?useUnicode=true&characterEncoding=utf-8

As shown in the figure:

Add reason:

        Mysql database uses GBK coding, while the project database uses UTF-8 coding.

Read More: