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.

修改方式:Pycharm连接Mysql8.0的坑_第1张图片

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.Pycharm连接Mysql8.0的坑_第2张图片检查连接池是否正确

3.试试将URL改成这个:jdbc:mysql://localhost:3306/dbname?useSSL=false&serverTimezone=UTC

   

 

 

你可能感兴趣的:(Pycharm连接Mysql8.0的坑)