美文网首页
java.sql.SQLException: Unknown i

java.sql.SQLException: Unknown i

作者: 乐兔uu | 来源:发表于2018-07-02 16:54 被阅读0次

问题描述:

使用mysql8.+版本,使用myeclipse连接数据库时总报Unknown initial character set index '255' received from server.错误

原因:

MySQL驱动和数据库字符集设置不搭配

解决:

在数据库后面说明字符集

jdbc:mysql://localhost:3306/db?useUnicode=true&characterEncoding=utf8;

相关文章

网友评论

      本文标题:java.sql.SQLException: Unknown i

      本文链接:https://www.haomeiwen.com/subject/sgpluftx.html