连接docker中的mysql
1.首先通过docker构建了ubuntu容器
2.在ubuntu容器中安装mysql
3.启动容器并构建了数据卷,端口分别为22和3306
4.通过远程连接工具连接ubuntu的mysql,缺连接不上。(这里的mysql不是直接docker镜像而是在ubuntu镜上安装的mysql)
请咋上述的条件下如何实现远程连接呢?报错为”Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost.: null”
请确保在 Ubuntu 容器中已经安装和启动了诸如 远程连接 SSH 服务,同时网络连接能够正常访问容器