微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

netsh 端口代理并不总是适用于 SQL Server

如何解决netsh 端口代理并不总是适用于 SQL Server

我有一台在 Parallels 中运行 Windows 10 21H1 的 Mac。在 macOS 上,我在 Docker 容器中运行 sql Server,在端口 55556 上公开。 在 Windows 中,我试图将 localhost,55555 转发到 Docker 中的 sql Server。
为此,我尝试了 netsh interface portproxy add v4tov4 listenaddress=localhost listenport=55555 connectaddress=10.211.55.2 connectport=55556,但这仅在连接 Datagrip 时有效(在 Windows VM 中,使用 JDBC 驱动程序);我可以查看所有数据库查询它们等
sql 管理工作室总是给出以下错误

A network-related or instance-specific error occurred while establishing a connection to sql Server. The server was not found or was not accessible. Verify that the instance name is correct and that sql Server is configured to allow remote connections. (provider: TCP Provider,error: 0 - The wait operation timed out.) (Microsoft sql Server,Error: 258)

sql Management Studio 使用的驱动程序是否存在忽略此端口转发的内容

解决方法

我想通了:具有侦听地址 localhost 的 portproxy 不起作用,但 127.0.0.1 起作用。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。