avatarThenusan Santhirakumar

Summary

The web content provides a step-by-step guide on how to install SQL Server on a Mac M1 using Docker, Azure Data Studio, and Azure SQL Edge.

Abstract

The article "How to Install SQL Server in Mac M1" addresses the challenges faced by users transitioning from Windows to Mac OS X, particularly in installing SQL Server on the new Apple Silicon M1 chips. The author explains that due to the lack of native support for Microsoft technologies on MacOS, Docker is utilized to facilitate the installation. The process involves downloading Docker from its official website, using Azure Data Studio as an alternative to SQL Server Management Studio, and pulling the Azure SQL Edge image from Docker Hub to run SQL Server in a container. The guide emphasizes the importance of creating a strong password for the SQL Server instance and provides visual aids to help users navigate through each step. The author encourages interaction and questions through the response section and promotes Medium membership for uninterrupted learning.

Opinions

  • The author expresses personal difficulty in adapting to software installation on Mac OS, implying a learning curve for users transitioning from Windows.
  • Azure Data Studio is recommended as a viable cross-platform alternative to SQL Server Management Studio for Mac users.
  • The author suggests that using a strong password for the SQL Server instance is crucial for security.
  • The article is written with the intent to assist and educate, inviting readers to engage and seek clarification on any points discussed.
  • A subtle promotion for Medium membership is included, indicating potential benefits for both the reader and the author in terms of content access and support.

Mac OS Tips for Programming

How to Install SQL Server in Mac M1

Installing SQL Server in Mac M1 Using Docker

Hi everyone 😃,

When we switch our operating system, such as from Windows to Mac OS X, 🍎, we may face many software-related installation problems. As a result, I wanted to use Mac OS. However, there are significant differences between Windows and Mac. As a result, I had a lot of trouble installing software on Mac OS. In this story, I will show you how to install SQL Server on a Mac M1.

Photo by Christian Lue on Unsplash

Step 1

We must utilize Docker because MacOS does not provide native support for Microsoft technology. Fortunately, Docker already supports ARM applications, so we can get it from the Docker website.

Docker Website Link — https://www.docker.com

Direct Download Link (Docker)

https://desktop.docker.com/mac/stable/arm64/Docker.dmg?utm_source=docker&utm_medium=webreferral&utm_campaign=dd-smartbutton&utm_location=header

Image by Author

Step 2

After that, go running SQL queries and other DB activities. You’ll need to download an IDE.

SQL Server Management Studio is the greatest tool for SQL Server to run SQL queries, although it is only supported on Windows OS.

Microsoft has developed an alternative to SQL Server Management Studio, thanks to their team. Azure Data Studio is the tool’s name. This tool will be used on our M1-based Mac.

Download Azure Data Studio

Image by Author

Step 3

We’ll need to create an ID on https://hub.docker.com or log in with the one you already have.

After you’ve logged in, you’ll need to download a Microsoft-hosted Docker image called Azure SQL Edge.

Image by Author

We’ll use Docker commands to download this image to our local system and then run it in a Docker container on the localhost port. We’ll be able to use the SQL server on our M1-based Mac once we run the image in the container.

Step 4

We can use the macOS terminal to download the Docker image.

Open the terminal in your Mac system and enter the command:

docker pull mcr.microsoft.com/azure-sql-edge
Image by Author

Docker will start pulling the image from the web repository and downloading it to your local machine after you run the command above.

The image is also visible in the Docker Desktop window, as illustrated below.

Image by Author

Step 5

Once you’ve downloaded the Docker image, you’ll need to execute it in a Docker container on a live localhost port.

Use the same terminal window to run the command below.

docker run -d — name MySQLServer -e ‘ACCEPT_EULA=Y’ -e ‘SA_PASSWORD=your_password123’ -p 1433:1433 mcr.microsoft.com/azure-sql-edge

Highly Recommended to use a Strong Password

Image by Author

When the command completes successfully, go to the container option in the Docker desktop window and look for a container with the same name as the one we specified in the command.

Image by Author

Step 6

After that, we can log in to Azure Data Studio using the credentials we just created. Here’s how you can get in touch with it:

Image by Author

You can now construct queries to generate tables, stored procedures, and other objects using the new query option.

If you forget your password, you may simply remove the image and establish a new one.

I believe that you understood the topic discussed today. If you have any concerns or need any clarifications, don’t hesitate to contact me through the response section. Thank you for spending your precious time reading this blog. I believe this will help you work with SQL on Mac OS.

Enjoyed the article? Become a Medium member to continue learning without limits. I’ll receive a portion of your membership fee if you use the above link, at no extra cost to you.

Photo by Pete Pedroza on Unsplash
Sql
Mac
Windows
Apple
Microsoft
Recommended from ReadMedium