2017-09-20 40 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。

希望它有帮助。

相关问题