连接MySQL数据库 Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failure
这个MySQL,是在 虚拟机 中的 Docker 容器中的,连不上,一直以为是 虚拟机的问题,但是 本机和虚拟机都Ping的通,也不知道为啥。然后,看到网上说,重启一下 Docker 一下,就好了。于是,就好了。重启 Dockersystemctl start docker//获取 容器的 IDdocker ps根据ID,来启动 容器docker start b701414d942a...
·
这个MySQL,是在 虚拟机 中的 Docker 容器中的,连不上,一直以为是 虚拟机的问题,但是 本机和虚拟机都Ping的通,也不知道为啥。
然后,看到网上说,重启一下 Docker 一下,就好了。
于是,就好了。
重启 Docker
systemctl start docker
//获取 容器的 ID
docker ps
//根据ID,来启动 容器
docker start b701414d942a
更多推荐
所有评论(0)