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

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

Because I have configured idea and mysql in advance, I am sure that there is no problem with my configuration. The specific configuration can be seen here, which is very important.

So the question is coming? Where is my problem? After thinking about it, I thought it was a problem with the mysql server, so I tried to connect to mysql with Navicat. As expected, it failed and an error was reported:
2003 - Can't connect to MySQL server on 'localhost(10061)

Navicat connects to mysql, error: 2003-Can't connect to MySQL server on'localhost(10061)

Insert picture description here
Check the mysql service, it is not turned on, I tried to start it, but it failed to start manually, so I can only reinstall mysql.
Insert picture description here
After reinstalling msyql, Navicat connects successfully! Idea successfully connected!
Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_44505194/article/details/106848714