macOS下安装微软sql server

mssql-server并不支持macOX,一般须要安装一个虚拟机,但如今有了Docker以后,一切都变得简单了。linux

首先,你须要安装Docker,这个很简单。推荐使用最新版docker。git

安装Docker以后,须要配置国内的阿里云镜像(参考我上一篇博客),速度很是快。sql

因为微软sqlserver已经出了linux版本了,安装mssql-server-linux(点我)docker

官方的文档和说明已经很详细了,这里须要注意一点,SA的密码必定要设置成强密码,否则回报以下的错误:bash

Microsoft(R) SQL Server(R) setup failed with error code 1. 
Please check the setup log in /var/opt/mssql/log for more information.
  • A strong system administrator (SA) password: At least 8 characters including uppercase, lowercase letters, base-10 digits and/or non-alphanumeric symbols.
  • SA管理员强密码:至少8歌字符,包含大小写字母,数字或者特殊符号。

注意,Mac下不支持目录映射。sqlserver

如何你用-v参数映射了磁盘目录,会报如下错误:阿里云

2017-01-04 03:36:27.37 Server      Error: 17113, Severity: 16, State: 1.
2017-01-04 03:36:27.37 Server      Error 2(The system cannot find the file specified.) 
occurred while opening file 'C:\var\opt\mssql\data\master.mdf' to obtain configuration information
at startup. An invalid startup option might have caused the error. 
Verify your startup options, and correct or remove them if necessary.
2017-01-04 03:36:27.37 Server      SQL Server shutdown has been initiated
相关文章
相关标签/搜索