mysql踩坑

Posted yuanpx

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了mysql踩坑相关的知识,希望对你有一定的参考价值。

com.mysql.cj.core.exceptions.InvalidConnectionAttributeException: 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.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)

解决方法:

 jdbc:mysql://localhost:3306/mybatis?characterEncoding=utf-8

  换成:

  jdbc:mysql://localhost:3306/mybatis?serverTimezone=CTT&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true






以上是关于mysql踩坑的主要内容,如果未能解决你的问题,请参考以下文章

Fastlane 一键打包/发布APP - 使用记录及踩坑

PyCharm+PyQt5(5.15.2)+mysql, PyQt5连接mysql,踩坑与解决办法

PyCharm+PyQt5(5.15.2)+mysql, PyQt5连接mysql,踩坑与解决办法

PyCharm+PyQt5(5.15.2)+mysql, PyQt5连接mysql,踩坑与解决办法

PyCharm+PyQt5(5.15.2)+mysql, PyQt5连接mysql,踩坑与解决办法

centos 远程连接数据库踩坑记