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

时间:2024-03-31 18:17:32

Exception in thread “main” java.sql.SQLException: Unknown initial character set index ‘255’ received from server. Initial client character set can be forced via the ‘characterEncoding’ property.

Exception in thread “main“ java.sql.SQLException: Unknown initial character set index ‘255‘ received
解决方法:
只需要在URL的最后面加上?useUnicode=true&characterEncoding=utf-8
Exception in thread “main“ java.sql.SQLException: Unknown initial character set index ‘255‘ received