已解决:[08001] Could not create connection to database server. Attempted reconnect 3 times.

时间:2024-04-01 20:18:24

IDEA连接mysql报错[08001] Could not create connection to database server. Attempted reconnect 3 times.

因为我提前配置好了idea和mysql,所以我确定自己的配置没有问题,具体配置可以看这里,很重要。

那么问题来了?我这个问题到底出现在哪里?想了一下,觉得应该是mysql服务器的问题,于是试着用navicat连接mysql,果不其然,失败报错:
2003 - Can't connect to MySQL server on 'localhost(10061)

navicat连接mysql,报错:2003 - Can’t connect to MySQL server on 'localhost(10061)

已解决:[08001] Could not create connection to database server. Attempted reconnect 3 times.
查看mysql服务,没有开启,我尝试启动,竟然手动启动都失败了,于是我只能 重装mysql。
已解决:[08001] Could not create connection to database server. Attempted reconnect 3 times.
重装msyql后,navicat连接成功!idea连接成功!
已解决:[08001] Could not create connection to database server. Attempted reconnect 3 times.