Connection to api@localhost failed. [08001] Could not create connection to d
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的更多相关文章
- 关于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数据库错误 ...
- pycharm连不上数据库:报警代码Connection to api@localhost failed. [08001] Could not create connection to d
pycharm 换成2019之后连接数据库用户名密码数据库名字都没错,就是连接不上去,网上百度一下,试试将URL后面拼接 ?useSSL=false&serverTimezone=UTC 发现 ...
- 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 ...
- pycharm2019连接mysql错误:08801 ------Connection to django1@localhost failed. [08001] Could not create connection to database server. Attempted reconnect 3 times. Giving up.
- 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 成功后为:
- 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,之后更改合适的驱动. 我的 ...
- Connection to newtaotao failed. [08001] Could not create connection to database
jdbc.url=jdbc:mysql://localhost:3306/newtaotao?serverTimezone=UTC&characterEncoding=utf-8 数据库是5. ...
- 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 后面街上一句 因为笔 ...
- 解决Connection to Xxx@localhost failed.
解决: Connection to jianshu@localhost failed. [08001] Could not create connection to database server. ...
随机推荐
- Windows加载器与模块初始化
本文是Matt Pietrek在1999年9月的MSJ杂志上发表的关于Windows加载器与模块初始化方面的文章.作者深入分析了LdrpRunInitialize璕outines例程的作用,用C语言写 ...
- Debian 9 安装 libsodium
到这里查看最新的版本号.如现在最新的版本号为1.0.18.下面均以该版本为例. 下载.编译和安装: wget https://download.libsodium.org/libsodium/rele ...
- 洛谷 CF894A QAQ
目录 题目 思路 \(Code\) 题目 CF894A 思路 \(\text{DP}\) 一个数组\(\text{QAQ[4][101]}\) \(\text{QAQ[1][i]表示在i这个位置q的个 ...
- SQL基础-过滤数据
一.过滤数据 1.使用WHERE子句 过滤数据:关键字WHERE SELECT 字段列表 FROM 表名 WHERE 过滤条件; 过滤条件一般由要过滤的字段.操作符.限定值三部分组成: 如: SELE ...
- BMP图像信息隐藏
图像隐写算法LSB—Least Significant Bits,又称最不显著位.LSB算法就是将秘密信息嵌入到载体图像像素值得最低有效位,改变这一位置对载体图像的品质影响最小. 原理如下: 以实验用 ...
- JDK 下载相关资料
所有版本JDK下载地址: http://www.oracle.com/technetwork/java/archive-139210.html 下载账户密码: 2696671285@qq.com Or ...
- 搭建Portainer可视化界面
1.下载Portainer镜像 docker pull portainer/portainer 2.安装分为单机版及集群版 2.1单机版安装 docker run -d -p 9000:9000 \- ...
- GIT 使用记录,新手->会用(mac 用户)
(唔,mac 用户这个要求是因为集成在 terminal 中可直接使用) 1. github 中 创建 git 账户 2. github -> 在个人设置中 找到 ssh and GPGkey ...
- 【CS224n】Lecture8 Notes
注:这是2017年课程的lecture8.一直都在用RNN,但是对它内部的构造不甚了解,所以这次花了一个下午加一个晚上看了CS224n中关于RNN的推导,不敢说融会贯通,算是比以前清楚多了.做个笔记, ...
- Servlet使用反射机制
传统servlet存在的问题 每一个不同的请求都要写Servlet,导致整个项目servlet过多,不易维护 解决方案 同一个模块只写一个Servlet,然后每一个请求传一个参数,后台根据参数取调用不 ...