下面这个问题反正我是遇到了,也是难为我好几天,于是我决定发一个教程出来给大家看看!希望能帮助你们 

pycharm连接mysql是出现Connection to orm02@127.0.0.1 failed. [08001] Could not create connection to database server. Attempted reconnect 3 times. Giving up. Mysql 第1张

SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。

 

 

原因:

  可能是数据库的版本与本机装的驱动不匹配导致的,

 

 

解决方案一:

      在 url 后面街上一句 因为笔者亲自测试 可以解决

?serverTimezone=UTC

  

pycharm连接mysql是出现Connection to orm02@127.0.0.1 failed. [08001] Could not create connection to database server. Attempted reconnect 3 times. Giving up. Mysql 第2张

 

 

解决方案二:

   重新安装驱动可以解决:

  pycharm连接mysql是出现Connection to orm02@127.0.0.1 failed. [08001] Could not create connection to database server. Attempted reconnect 3 times. Giving up. Mysql 第3张

 

扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄