部署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 即可;