The*_*TFo 8 sql-server ubuntu windows-subsystem-for-linux
我是 WSL 的新手,正在运行 Ubuntu。我在 Windows 中安装了 SQL Server 2017 的本地实例,并想从 WSL 连接到它。我启用了远程连接,但是,我似乎无法在本地从 ubuntu 连接。
我为 ubuntu 安装了 db 工具,我正在使用 sqlcmd:
sqlcmd -S localhost -U sa -P <my password>
Run Code Online (Sandbox Code Playgroud)
这一直失败。我如何格式化/配置它以允许 Windows 中的 SQL Server 可用于 Ubuntu?
谢谢!
编辑
我正在使用 SQL Server 的默认实例
这是我得到的错误
Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : Login timeout expired.
Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : TCP Provider: Error code 0x2749.
Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online..
Run Code Online (Sandbox Code Playgroud)
ping 本地主机:
$ ping localhost
PING localhost (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=128 time=0.248 ms
64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=128 time=0.497 ms
64 bytes from localhost (127.0.0.1): icmp_seq=3 ttl=128 time=0.517 ms
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
4509 次 |
最近记录: |