问题描述:
使用mysql8.+版本,使用myeclipse连接数据库时总报Unknown initial character set index '255' received from server.错误
原因:
MySQL驱动和数据库字符集设置不搭配
解决:
在数据库后面说明字符集
jdbc:mysql://localhost:3306/db?useUnicode=true&characterEncoding=utf8;
jdbc.driver=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://localhost:3306/mybatis?serverTimezone=UTC&useUnicode=true&characterEncoding=utf-8
jdbc.username=root
jdbc.password=123456
jdbc.maxTotal=30
jdbc.maxIdle=10
jdbc.initialSize=5
JAR包