pycharm 换成2019之后连接数据库用户名密码数据库名字都没错,就是连接不上去,网上百度一下,试试将URL后面拼接

?useSSL=false&serverTimezone=UTC

发现终于可以了 也连接上去了,但是每一次都要自己设置一下???

完美解决办法,新版的8.0版的mysql连接池应该是 以前的5.7版本是com.mysql.jdbc.Driver

试试更改时区时(往往问题都是出现在这)

 a. 在终端里先使用管理员登录mysql,也就是root
mysql -uroot -p123
b. 输入命令
show variables like '%time_zone%'

 c. Mysql默认为美国时间,我国时区要晚8小时,因此修改时间即可
    set global time_zone = '+8:00' ;

 d. 设置完以后,退出mysql,重新登录,检查时间是否被修改

结束后就退出cmd,去pycharm里面重新连接看看

所以,最好还是不要升级为新版本,因为说不定哪天就会蹦出一个新的bug让你措手不及

Connection to api@localhost failed. [08001] Could not create connection to d的更多相关文章

  1. 关于Django数据库mysql连接错误问题Connection to api@localhost failed. [08001] Could not create connection to d

    Connection to api@localhost failed. [08001] Could not create connection to d 错误类型 django连接mysql数据库错误 ...

  2. pycharm连不上数据库:报警代码Connection to api@localhost failed. [08001] Could not create connection to d

    pycharm 换成2019之后连接数据库用户名密码数据库名字都没错,就是连接不上去,网上百度一下,试试将URL后面拼接 ?useSSL=false&serverTimezone=UTC 发现 ...

  3. pycharm2019连接mysql错误08801 ------Connection to django1@localhost failed. [08001] Could not create connection to database server. Attempted reconnect 3 times. Giving up.

    Error:Connection to django1@localhost failed. [08001] Could not create connection to database server ...

  4. pycharm2019连接mysql错误:08801 ------Connection to django1@localhost failed. [08001] Could not create connection to database server. Attempted reconnect 3 times. Giving up.

  5. IntelliJ IDEA连接不上数据库 (Connection to testdb@localhost failed. [08001] Could not create connection to database server. Attempted reconnect 3 times. Giving up.)

    问题提示为: 原因:MySQL数据库版本为8.0以上,需要在URL加上时区,即加上?serverTimezone=GMT 成功后为:

  6. Connection to 天mysql failed. [08001] Could not create connection to database server. Attempted ,报错处理方法

    https://blog.csdn.net/myzh215219/article/details/90314345 点击图上的DRIVER,然后点击GO TO DRIVER,之后更改合适的驱动. 我的 ...

  7. Connection to newtaotao failed. [08001] Could not create connection to database

    jdbc.url=jdbc:mysql://localhost:3306/newtaotao?serverTimezone=UTC&characterEncoding=utf-8 数据库是5. ...

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

    下面这个问题反正我是遇到了,也是难为我好几天,于是我决定发一个教程出来给大家看看!希望能帮助你们 原因: 可能是数据库的版本与本机装的驱动不匹配导致的, 解决方案一: 在 url 后面街上一句 因为笔 ...

  9. 解决Connection to Xxx@localhost failed.

    解决: Connection to jianshu@localhost failed. [08001] Could not create connection to database server. ...

随机推荐

  1. 注册服务到etcd中

    如上存放一些服务的key到etcd中,商品有两个,主要是为了负载均衡的key func NewService() *Service { config := clientv3.Config{ Endpo ...

  2. NTSTATUS代码摘录

    00000000 STATUS_SUCCESS00000000 STATUS_WAIT_000000001 STATUS_WAIT_100000002 STATUS_WAIT_200000003 ST ...

  3. linux下递归删除目录下所有exe文件---从删库到跑路篇

    linux下递归删除目录下所有exe文件 find . -name '*.exe' -type f -print -exec rm -rf {} \; (1) "." 表示从当前目 ...

  4. Theano入门笔记1:Theano中的Graph Structure

    译自:http://deeplearning.net/software/theano/extending/graphstructures.html#graphstructures 理解Theano计算 ...

  5. 【JZOJ6210】【20190612】wsm

    题目 定义两个非递减数列的笛卡尔和数列\(C = A \oplus B\) 为\((A_i+B_j)\)排序后的非递减数列 \(W\)组询问,问有多少对可能的数列,满足: \(|C|=s,|A| = ...

  6. QQ for Mac聊天纪录怎么查找??

    在你Mac上打开你的QQ,选择任意聊天窗口,打字的上面有6个图表快捷键,第6个就是查看聊天记录的功能键

  7. mysql union 组合查询

    mysql> select * from test -> ; +----+------------+-------+-----------+ | id | name | score | s ...

  8. fluent meshing建立周期性网格

    原视频下载地址:https://pan.baidu.com/s/1pKUXKgz 密码: 6pwh

  9. 后退欧拉法求解常微分方程(c++)

    #include<iostream> #include<iomanip> using namespace std; int main() { double x,y,yn,h,t ...

  10. 【2019.12.11】SDN上机第7次作业

    打开P4的目录,运行主程序 make run 此时输入命令 pingall 会显示所有的网络不通 改为下方代码 /* -*- P4_16 -*- */ #include <core.p4> ...