Professional Documents
Culture Documents
Install SQL
Server on a Mac
Install SQL Server directly to
your Mac — no virtual machine
required!
Install and
Con gure Docker
This is a prerequisite for installing SQL
Server on your Mac. Because the Mac
runs SQL Server inside a Docker
container, the first thing we need to do is
download and install Docker (unless it's
already installed). Once installed, we'll
increase its memory allocation to a more
suitable level for running SQL Server.
1
Pull the SQL Server
Image
https://www.quackit.com/sql_server/mac/install_sql_server_on_a_mac.cfm 2/8
4/6/2019 Install SQL Server on a Mac
2
Launch the SQL Server
Image
Run the following command to launch
an instance of the Docker image you just
downloaded:
--name Homer
-e 'ACCEPT_EULA=Y'
The Y shows that you agree with
the EULA (End User Licence
Agreement). This is required in
order to install SQL Server.
-e 'SA_PASSWORD=myPassw0rd'
Required parameter that sets the
sa database password.
-p 1433:1433
microsoft/mssql-server-linux
https://www.quackit.com/sql_server/mac/install_sql_server_on_a_mac.cfm 4/8
4/6/2019 Install SQL Server on a Mac
Password Strength
If you get the following error at
this step, try again, but with a
stronger password.
Microsoft(R) SQL
Server(R) setup failed
with error code 1.
Please check the setup
log in
/var/opt/mssql/log for
more information.
3
Check the Docker
container (optional)
Type the following command to check
that the Docker container is running.
docker ps
CONTAINER ID IMAGE
740fcb5193c6 microsoft/mss
https://www.quackit.com/sql_server/mac/install_sql_server_on_a_mac.cfm 5/8
4/6/2019 Install SQL Server on a Mac
docker ps -a
OR
docker ps -all
Check your
Installation &
Manage SQL
Server
Now that you've installed SQL Server on
your Mac, you'll probably want to check
that you can access it and query it, etc.
Then you'll probably want to start
creating databases and doing other DB-
related tasks. You'll need some sort of
management tool for this.
https://www.quackit.com/sql_server/mac/install_sql_server_on_a_mac.cfm 6/8
4/6/2019 Install SQL Server on a Mac
sql-cli
sql-cli is a cross platform
command line tool for SQL
Server. This means you can
create databases and query
them right from your Mac's
Terminal window.
Installation is as easy as running
a single command (assuming
you already have NodeJs
installed).
DBeaver
Another GUI option is DBeaver.
DBeaver is a free open source
database tool that works with
many di erent database
https://www.quackit.com/sql_server/mac/install_sql_server_on_a_mac.cfm 7/8
4/6/2019 Install SQL Server on a Mac
Quackit on Facebook
https://www.quackit.com/sql_server/mac/install_sql_server_on_a_mac.cfm 8/8