Skip to main content

How to install MSSQL in Mac using Docker?

MSSQL refers to Microsoft SQL which is more compatible with windows machines. What if we want it in our macbook. Well we do that using docker. 

You should follow following steps in order to install MS SQL Server in your macbook.

    1. Download and install Docker. {docker download}
    2. Open terminal
    3. Enter following command. This command will install microsoft sql server in your mac
    4. --> docker pull microsoft/mssql-server-linux
    5. Now set up the server name and password for your sql server using following command in terminal.
    6. --> docker run -d --name your_sql_server_name -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=SetYourPassword123' -p 1433:1433 microsoft/mssql-server-linux
    7. Note that the password should contain capital letter, small letter and number, otherwise you will face the popular problem that your sql server automatically shuts down after few seconds of start.
    8. You may want to install sql cli that allows you to type sql commands in terminal. For that command is: 
    9. --> sudo npm install -g sql-cli
    10. Now you may get an error saying that "npm" was not found if you don't have node installed. Well there's a fix for that too. Install node in your mac from here try the above command of step 5 again then it should work.
    11. Now connect to you sql server with below command. Enter your password that you used in step 4.
    12. -->mssql -u sa -p SetYourPassword123
    13. Now we don't have SQL server management studio for mac. Instead we use Azure Data Studio which you can download from here.
    14. After you installed Azure Data Studio, open it and click on "Add Connection" from its left panel. Then fill up the Connection details that appear in right bottom corner as below. Do as shown in picture below and enter your password "SetYourPassword123" that we set up in step 4. Click OK and you are connected.


That's it! You are done and good to go with ms sql. You can find your_sql_server_name in docker as well.


Thanks for reading.

Comments

Popular posts from this blog

Torrent Seedings are IMPORTANT

Because more the seeding faster the file downloading or fast sharing. Explanation: Firstly, SEEDERS: The one who uploads the file to the torrent site. LEECHERS: The one who downloads file from the torrent site. If someone uploaded a torrent to a site with the seeds at 100kbps and if there are 10 leechers then each leecher is approximately getting the file at 10kbps. After each 10 people finish downloading the torrent from the uploader and are seeding at a speed of 100kbps. Then the total speed of the torrent after the 10 get done downloading and seeding the file is 1100kbps. Because 10 are seeding at 100kbps and the original uploader is seeding at 100kbps. Now if there are 11 more leechers getting the file then each of those leechers are approximately getting the file at 100kbps instead of 10kbps because there is a 1 to 1 ratio per seeder & leecher. So if everyone just downloaded the file and stopped without seeding the torrent 1:1 then the speed of the torrent wil

HOW TO GOOGLE SEARCH

Google is the common platform of all to search for the information and it is easy. But it is very difficult to find the exact information in a less time. So there some trick to search your thing in GOOGLE. Do not search by writing a question in the google search box,instead always think for its answer and try to search for its possible answer's phrases. Use site: in front of the related site you are searching for that will only search the pages of that sites. example: site:kantipur.com, this will search your phrases in this site only Use " " to find for the exact phrase inside it. eg: "cricket scores" , looks for the cricket scores  Use -  to exclude the term from the search. eg: "cricket score"-IPL, means cricket score of all matches but not of IPL. Use ~ to search for the relating field.eg:"cricket score"~college this will look of the universities and higher education Use .. in between to get the result within that period of