栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

Unknown initial character set index ‘255‘ received from server. Initial client character set can be

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

Unknown initial character set index ‘255‘ received from server. Initial client character set can be

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

原因是:MySQL驱动和数据库字符集设置不搭配

解决方案:在配置数据源url时候需要拼接上characterEncoding

characterEncoding=utf-8

在后面加上characterEncoding=utf-8就可以解决以上的问题。

补充:有小伙伴在开发过程中可能还出现以下问题

问题描述:The server time zone value '�й���׼ʱ��' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the 'serverTimezone' configuration property) to use a more specifc time zone value if you want to utilize time zone support.

原因:MySQL时默认的是美国时区,这就跟中国时区不一样导致错误的发生,拼接上

serverTimezone=UTC 即可,可看以上图一

OK,欢迎探讨!!!

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/951164.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号