问题描述
Cause: java.sql.SQLException: 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.
解决方法
mybatis-config.xml配置文件中添加
serverTimezone=Asia/Shanghai&
<property name="url" value="jdbc:mysql:///student?serverTimezone=Asia/Shanghai&useSSL=false"/> 详细方法问题描述
连接数据库报错com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
解决方法
mybatis-config.xml配置文件中添加
&useSSL=false
<property name="url" value="jdbc:mysql:///student?serverTimezone=Asia/Shanghai&useSSL=false"/>
或者是链接数据库信息出错
<!--数据库连接信息-->
<property name="driver" value="com.mysql.jdbc.Driver"/>
<property name="url" value="jdbc:mysql:///mybatis?useSSL=false"/>
<property name="username" value="root"/>
<property name="password" value="1234"/>
</dataSource>
标签:xml,zone,配置文件,错误,5.13,MyBatits,time,mybatis From: https://www.cnblogs.com/TokaiTeio32/p/17397573.html