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


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


As shown in the figure:

Add reason:

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

Read More: