在连接数据库时出现这样的问题
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.
解决方案:
第一眼看到包含255字样,一想应该是字符集不合适,随后检查之后是没有设置字符集,
因此在URL路径 后面输入
?useUnicode=true&characterEncoding=utf8;
便可以成功运行
