M1 idea链接Mysql数据库时提示Communications link failure

M1 idea链接Mysql数据库时提示Communications link failure,连接数据库的jar包已经和mysql版本号相同,本地navicat连接的话需要选择使用套接字文件才能使用,idea也是类似问题嘛

Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.


img

密码得输入,再测试连接

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.这个错误信息一般是数据库连接异常。确定数据库正常安装?第三方工具可以连接?