Install MS SqlServer on Mac
Table of contents
Prerequisite
You’re using Mac
You should have Docker installed (if not, please check this link to install, and get back)
Choose A Place on your Mac
You can choose anywhere to store a docker-compose file. For example,
Create docker-compose.yml
Type or copy the following code into it. Please take care of the indents (If you encounter any issue of the syntax of YML, please use this Online YML Checker) to help you.
[Optional] change the password to yours.
version: "3"
services:
mssql:
image: mcr.microsoft.com/azure-sql-edge
cap_add: [ 'SYS_PTRACE' ]
environment:
- ACCEPT_EULA=1
- MSSQL_SA_PASSWORD=StrongPwd123
ports:
- "1433:1433"
hostname: mssql
volumes:
mssql-azuresql-edge-data:
Generate your SqlServer Container
Open your terminal and switch to the path as same as your docker-compose.yml file. Type the following command.
docker-compose up
If everything goes well, you would see a similar outputs like me.
Additional Commands
You can press “Ctrl-C” to stop the container. And then you can use “docer-compose start” to start you container in the future.
dockcer-compose start
After you want to stop your container. Please use below command.
dockcer-compose stop
Connect to Sql Server
Prerequisite
Installed Azure Data Studio
A Running Sql Server