初次使用MYSQL,IDEA连接MYSQL出现 [08001] Could not create connection to database server.
程序员文章站
2022-05-01 15:55:26
...
初次使用MYSQL,IDEA连接MYSQL出现 [08001] Could not create connection to database server.
第一次使用MYSQL,也是第一次IDEA连接MYSQL,但是弄了很久都连接不上,上网查了许多办法,弄了很久才成功。所以我把我成功连接的方法写下了,给大家一个参考。
点击Error后面的view,出现这样的描述
解决办法:
选择MYSQL for 5.1
测试连接
发现连接还是失败,原因是:Database哪里我填的是DB(我没有建这个数据库),我就换了一个我建过的,就连接成功了;或者不填。
我的失败原因:IDEA连接数据库驱动的版本不对。
除此之外,网上见到的比较多的还有一个原因:
因为系统的默认的时间格式与idea中连接数据库的字符格式不一样,所以会报出现的错误。
我把解决办法写在这里:
在URL后面增加?serverTimezone=GMT
上一篇: [08001] Could not create connection to database server. Attempted reconnect 3 times. Giving up.
下一篇: Could not create connection to database server. Attempted reconnect 3 times. Giving up.
推荐阅读
-
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,IDEA连接MYSQL出现 [08001] Could not create connection to database server.
-
IDEA连接数据库失败@localhost failed. [08001] Could not create connection to database server. Attempte
-
idea连接MySQL报错Could not create connection to database server. Attempted reconnect 3 times. Giving up.
-
pycharm连接mysql是出现Connection to orm02@127.0.0.1 failed. [08001] Could not create connection to database server. Attempted reconnect 3 times. Giving up.