How to install MS SQL in Mac OS
This article is a small attempt to explain how we can install MS SQL Server on Mac OS with the help of Docker.
Note: Below are steps, I have followed on MacBook Pro (M1)
Step 1: Download Docker Desktop and install it on your system
Step 2: Download the Microsoft SQL Server image to Docker using terminal
Note: System will prompt for user password as sudo command is used.
sudo docker pull mcr.microsoft.com/mssql/server:2019-latest
Verify the above step by opening the Docker Desktop application, we should see the above-downloaded image
Step 3: Run the Container by running the below command in terminal
docker run -e "ACCEPT_EULA=1" -e "MSSQL_SA_PASSWORD=<<Provide a strong password>>" -e "MSSQL_PID=Developer" -e "MSSQL_USER=SA" -p 1433:1433 -d --name=<<Provide the name of Container>> mcr.microsoft.com/azure-sql-edge
Step 4: Download and Install GUI to connect to MS SQL Server
Download Azure Data Studio from the Microsoft website and follow the steps mentioned on the website. Link to Download
Step 5: Launch Azure Data Studio and connect to the server created in Step 3
Provide the below details to connect
Hurray!!! you should be able to connect to MS SQL database. In a similar way, you can install and give a try to different databases.
Happy Learning!!!