1. 程式人生 > >Pycharm連線Mysql8.0的坑

Pycharm連線Mysql8.0的坑

Pycharm連線Mysql8.0

1.錯誤:[S1009] The connection property 'zeroDateTimeBehavior' acceptable values are: 'CONVERT_TO_NULL','EXCEPTION' or 'ROUND'.The value 'convertToNull' is not acceptable.

修改方式:

zeroDateTimeBehavior=convertToNull改為zeroDateTimeBehavior=CONVERT_TO_NULL

2.錯誤 :[08001] Could not create connection to database server. Attempted reconnect 3 times. Giving up.

修改:

1.檢查user和password是否有錯

2.檢查連線池是否正確

3.試試將URL改成這個:jdbc:mysql://localhost:3306/dbname?useSSL=false&serverTimezone=UTC