2017-09-20 42 views
3

我是Mac OS的新用戶,我使用Visual Studio代碼作爲文本編輯器。我想創建我的第一個SQL。我無法通過Mac上的Visual Studio代碼連接到SQL Server

我一直在下面一步一步在這個網站: https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-develop-use-vscode

此外,我還安裝OpenSSL的下列步驟分步對這個網​​站: http://mac-dev-env.patrickbougie.com/openssl/

問題是,當我嘗試使在第一次的SQL連接,它給了我這樣的錯誤:

mssql: Failed to connect: System.Data.SqlClient.SqlException (0x80131904): 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: 35 - An internal exception was caught) ---> System.AggregateException: One or more errors occurred. (Connection refused [::1]:1433) ---> Sys RetryClose Error

如何解決此問題並創建我的第一個新SQL?謝謝

+1

你能解決這個問題嗎? –

+0

對此有什麼好運?我有同樣的問題。 – Yatrix

回答

0

你確定你的碼頭集裝箱正在運行嗎? 您可以在終端中使用「docker ps」進行檢查。 您還必須確保在創建容器時映射到端口1433。

希望它有幫助。

相關問題