java.sql.SQLException: Unknown initial character set index ‘255‘ received from server. Initial clie

java.sql.SQLException: Unknown initial character set index ‘255’ received from server. Initial client character set can be forced via the ‘characterEncoding’ property.错误

报错

java.sql.SQLException: Unknown initial character set index ‘255‘ received from server. Initial clie_第1张图片

错误原因:字符集不匹配 默认字符集与数据库字符集不一致

解决方法:在url后加上 ?useUnicode=true&characterEncoding=utf8

java.sql.SQLException: Unknown initial character set index ‘255‘ received from server. Initial clie_第2张图片

你可能感兴趣的:(java.sql.SQLException: Unknown initial character set index ‘255‘ received from server. Initial clie)