文章目录
- IDEA连接mysql报错[08001] Could not create connection to database server. Attempted reconnect 3 times.
- navicat连接mysql,报错:2003 - Can't connect to MySQL server on 'localhost(10061)
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._第1张图片](http://img.e-com-net.com/image/info8/d162cb1cfe614c379b7ca1fa4e83c1b4.jpg)
查看mysql服务,没有开启,我尝试启动,竟然手动启动都失败了,于是我只能 重装mysql。
![已解决:[08001] Could not create connection to database server. Attempted reconnect 3 times._第2张图片](http://img.e-com-net.com/image/info8/dba4a4b03ddc4d99af69dfd3493e9f13.jpg)
重装msyql后,navicat连接成功!idea连接成功!
![已解决:[08001] Could not create connection to database server. Attempted reconnect 3 times._第3张图片](http://img.e-com-net.com/image/info8/9688fe3fcf8d42689dba3a81ca174142.jpg)