部署mysql版本项目问题记录

一,com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure报错

将url从jdbc:mysql://localhost:3306/datashare?useUnicode=true&characterEncoding=utf-8&useSSL=true改为

jdbc:mysql://localhost:3306/datashare?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=UTC

二,The connection property 'zeroDateTimeBehavior' only accepts values of the form: 'exception', 'round' or 'convertToNull'. The value 'CONVERT_TO_NULL' is not in this set.报错

具体信息为:

The connection property 'zeroDateTimeBehavior' only accepts values of the form: 'exception', 'round' or 'convertToNull'. The value 'convertToNull ' is not in this set.

将zeroDateTimeBehavior=CONVERT_TO_NULL改为zeroDateTimeBehavior=convertToNull 

三,mysql查询时表名大写的时候报错Table 'datashare.TEST' doesn't exist

用 root 登录,修改 /etc/my.cnf (注意:以实际 my.cnf 配置文件路径为准)
在 [mysqld] 节点下,加入一行: lower_case_table_names=1(0:大小写敏感;1:大小写不敏感)

重启 MySQL 即可;

原文地址:https://www.cnblogs.com/cailijuan/p/10002475.html