Unknown initial character set index '255' received from server. Initial client character set can be forced via the 'characterEncoding' property.

Unknown initial character set index '255' received from server. Initial client character set can be forced via the 'characterEncoding' property.

从错误的提示信息中发现字符集设置出现问题

原因:数据库字符集和mysql的驱动不搭配

解决方式:在数据库连接指定字符集

jdbc:mysql://localhost:3306/dbName?characterEncoding=utf-8 
posted @ 2021-08-30 09:06  唏嘘-  阅读(440)  评论(0编辑  收藏  举报