Unknown initial character set index '255' received from server. Initial client character 解决方法
Unknown initial character set index '255' received from server. Initial client character 解决方法
mysql连接数据库时报此错误:
//String url = "jdbc:mysql://localhost:3306/mytest_db" 如果使用这句就会报错。 //Unknown initial character set index '255' received from server. Initial client character set can be forced via the 'characterEncoding' property. String url = "jdbc:mysql://localhost:3306/mytest_db?useUnicode=true&characterEncoding=utf8"; //改成这句,就可以了
代码语言:javascript代码运行次数:0运行复制#jdbc.mysql.className=com.mysql.jdbc.Driver
jdbc.mysql.className=com.p6spy.engine.spy.P6SpyDriver
#jdbc.mysql.url=jdbc:mysql://127.0.0.1:3306/mytest_db?useUnicode=true&characterEncoding=utf-8
##&修改成& 可以解决报错
jdbc.mysql.url=jdbc:mysql://127.0.0.1:3306/mytest_db?useUnicode=true&characterEncoding=utf-8
jdbc.mysql.user=test
jdbc.mysql.password=test
jdbc.dbcp.maxActive=30
jdbc.dbcp.maxIdle=16
jdbc.dbcp.maxWait=10000
jdbc.dbcp.defaultAutoCommit=true
jdbc.dbcp.removeAbandoned=true
jdbc.dbcp.removeAbandonedTimeout=60
jdbc.dbcp.logAbandoned=true
本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。 原始发表:2023-09-08,如有侵权请联系 cloudcommunity@tencent 删除serversetjdbccharacterclient发布者:admin,转转请注明出处:http://www.yc00.com/web/1754976562a5223590.html
评论列表(0条)