简体   繁体   English

基于 M1 的 Mac 上的 SQL 服务器

[英]SQL Server on M1 based Mac

I am trying to install SQL Server on M1 based Mac with Docker.我正在尝试使用 Docker 在基于 M1 的 Mac 上安装 SQL 服务器。

https://debugsolutions.wordpress.com/2021/03/17/using-sql-server-on-m1-based-mac-with-docker/ https://debugsolutions.wordpress.com/2021/03/17/using-sql-server-on-m1-based-mac-with-docker/

Made it all the way to end of step 5, but my container won't connect.一直到第 5 步结束,但我的容器无法连接。 I am getting:我正进入(状态:

1/08/02 01:31:47 [launchpadd] INFO: Launchpadd is connecting to mssql on localhost:1431 1/08/02 01:31:47 [launchpadd] 信息:Launchpadd 正在连接到 localhost:1431 上的 mssql

2021/08/02 01:31:47 [launchpadd] WARNING: Failed to connect to SQL because: dial tcp 127.0.0.1:1431: connect: connection refused, will reattempt connection. 2021/08/02 01:31:47 [launchpadd] 警告:无法连接到 SQL,因为:拨打 tcp 127.0.0.1:1431:连接:连接被拒绝,将重新尝试连接。

2021/08/02 01:31:48 [launchpadd] WARNING: Failed to connect to SQL because: dial tcp 127.0.0.1:1431: connect: connection refused, will reattempt connection. 2021/08/02 01:31:48 [launchpadd] 警告:无法连接到 SQL,因为:拨打 tcp 127.0.0.1:1431:连接:连接被拒绝,将重新尝试连接。

2021/08/02 01:31:49 [launchpadd] WARNING: Failed to connect to SQL because: dial tcp 127.0.0.1:1431: connect: connection refused, will reattempt connection. 2021/08/02 01:31:49 [launchpadd] 警告:无法连接到 SQL,因为:拨打 tcp 127.0.0.1:1431:连接:连接被拒绝,将重新尝试连接。

2021/08/02 01:32:41 [launchpadd] INFO: Extensibility Log Header: 2021/08/02 01:32:41 [launchpad] 信息:可扩展性日志 Header:

2021/08/02 01:32:41 [launchpadd] WARNING: Failed to load /var/opt/mssql/mssql.conf ini file with error open /var/opt/mssql/mssql.conf: no such file or directory 2021/08/02 01:32:41 [launchpadd] 警告:无法加载 /var/opt/mssql/mssql.conf ini 文件,错误打开 /var/opt/mssql/mssql.conf:没有这样的文件或目录

2021/08/02 01:32:41 [launchpadd] INFO: DataDirectories = /bin:/etc:/lib:/lib32:/lib64:/sbin:/usr/bin:/usr/include:/usr/lib:/usr/lib32:/usr/lib64:/usr/libexec/gcc:/usr/sbin:/usr/share:/var/lib:/opt/microsoft:/opt/mssql-extensibility:/opt/mssql/mlservices:/opt/mssql/lib/zulu-jre-11:/opt/mssql-tools 2021/08/02 01:32:41 [launchpadd] 信息:DataDirectories = /bin:/etc:/lib:/lib32:/lib64:/sbin:/usr/bin:/usr/include:/usr/lib: /usr/lib32:/usr/lib64:/usr/libexec/gcc:/usr/sbin:/usr/share:/var/lib:/opt/microsoft:/opt/mssql-extensibility:/opt/mssql/mlservices :/opt/mssql/lib/zulu-jre-11:/opt/mssql-工具

2021/08/02 01:32:41 Drop permitted effective capabilities. 2021/08/02 01:32:41 删除允许的有效功能。

2021/08/02 01:32:41 [launchpadd] INFO: Polybase remote hadoop bridge disabled 2021/08/02 01:32:41 [launchpad] 信息:Polybase 远程 hadoop 网桥已禁用

2021/08/02 01:32:41 [launchpadd] INFO: Launchpadd is connecting to mssql on localhost:1431 2021/08/02 01:32:41 [launchpadd] 信息:Launchpadd 正在连接到 localhost:1431 上的 mssql

2021/08/02 01:32:41 [launchpadd] WARNING: Failed to connect to SQL because: dial tcp 127.0.0.1:1431: connect: connection refused, will reattempt connection. 2021/08/02 01:32:41 [launchpadd] 警告:无法连接到 SQL,因为:拨打 tcp 127.0.0.1:1431:连接:连接被拒绝,将重新尝试连接。

2021/08/02 01:32:42 [launchpadd] WARNING: Failed to connect to SQL because: dial tcp 127.0.0.1:1431: connect: connection refused, will reattempt connection. 2021/08/02 01:32:42 [launchpadd] 警告:无法连接到 SQL,因为:拨打 tcp 127.0.0.1:1431:连接:连接被拒绝,将重新尝试连接。

2021/08/02 01:32:43 [launchpadd] WARNING: Failed to connect to SQL because: dial tcp 127.0.0.1:1431: connect: connection refused, will reattempt connection. 2021/08/02 01:32:43 [launchpadd] 警告:无法连接到 SQL,因为:拨打 tcp 127.0.0.1:1431:连接:连接被拒绝,将重新尝试连接。

How can I fix this?我怎样才能解决这个问题?

The command I ran at end of step 5:我在第 5 步结束时运行的命令:

docker run --cap-add SYS_PTRACE -e ‘ACCEPT_EULA=1’ 
    -e ‘MSSQL_SA_PASSWORD=Password.1’ -p 1433:1433 --name azuresqledge 
    -d mcr.microsoft.com/azure-sql-edge

docker 命令中的‘替换’

$ docker run --cap-add SYS_PTRACE -e 'ACCEPT_EULA=1' -e 'MSSQL_SA_PASSWORD=Password.1' -p 1433:1433 --name azuresqledge -d mcr.microsoft.com/azure-sql-edge

For Mac: I tried the given command but docker image would not run correctly on Mac.对于 Mac:我尝试了给定的命令,但 docker 镜像无法在 Mac 上正确运行。 It stopped with error.它因错误而停止。

Then I modified the command without using quotes and few other changes, the image then worked correctly.然后我修改了命令而不使用引号和其他一些更改,图像然后正常工作。

docker run -d --name SQLServerImg -e ACCEPT_EULA=Y -e SA_PASSWORD=StrongPassword@123 -p 1433:1433 mcr.microsoft.com/azure-sql-edge

Make sure you are able to see the docker container running.确保您能够看到 docker 容器正在运行。 Check the container log.检查容器日志。

I was able to login using DataGrip without any issue.我能够使用 DataGrip 登录而没有任何问题。

A bit late to the party but if you don't want to resort to using the cutdown Edge edition I found away to get SQL Server Linux going using an open source tool called Lima and Rosetta as the VM: https://dev.to/srburnham/forget-azure-sql-edge-on-a-m1-mac-run-full-blown-sql-server-linux-instead-a-how-to-6d2晚会有点晚了,但如果你不想使用精简版 Edge 版本,我发现 SQL 服务器 Linux 将使用名为 Lima 和 Rosetta 的开源工具作为 VM: https://dev.to /srburnham/forget-azure-sql-edge-on-a-m1-mac-run-full-blown-sql-server-linux-instead-a-how-to-6d2

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM