✅ MSSQL on Mac help
Hi guys,
I have an upcoming course at my university that requires me to install SQL Server 2022 and SSMS, but the problem is those apps are exclusively for Windows. I'm on an M2 mac, and I have a student license for JB DataGrip. Can anyone help me set up DataGrip so it has the same functionality as SSMS with the SQL server (if it's at all possible). I tried using the guide on DataGrips' forums, but I'm not sure I actually achieved anything.
Thanks in advance!
177 Replies
If DataGrip doesn't work, please recommend something else, I just want to know if it's even possible to get the same functionality as I would on Windows
I don't think you can do SQL Server on non-windows machines, though I may be wrong
worst case you install a windows vm
:/
parallels is really popular
I've read about Docker, but I tried running all the commands and it just blew up in my face after it realized im on the arm chipset
ty, ill check it out
oh yeah docker could work too
docker should work on m1
or m2
ye, but thats what I need help with
I can't figure out how to do it
plus i need mssql apparantly (bear with me, I don't understand anything about sql and servers and so on, yet)
did you install docker?
ye, then i ran the commands for sql 2022, it downloaded just fine, but when I tried to run it it failed because i was on the wrong chipset
what command did you run
yeah i tried basically the same thing, except not for azure
but for datagrip
i might have to use azure tho apparently
datagrip works too
SQL server is definately not windows only, it has a linux version among other things
you can connect with anything
when i tried i got an error
SSMS is however, but datagrip should cover most cases
Ah, its an M1 mac
that might complicate things
would azure sql edge be exclusive to azure?
yee :/ so ive been told
i meant to reply to the other message
no
that just seems to be the name of the image
by microsoft
so just pull that and run it
im still new to this, is this ms sql?
just with a different name
alright, ill go run it, be back later
thnx for the help guys
I'd try this first thou
Microsoft SQL Server - Ubuntu based images by Microsoft | Docker Hub
Official images for Microsoft SQL Server based on Ubuntu
thats the exact one i ran
Im not entirely sure what azure edge is.
Small-footprint, edge-optimized SQL database engine with built-in AI?
and it threw an error because i was on the arm chipset
here, ill show you the error
one sec
Azure SQL Edge is built on the latest version of the SQL Database Engine. It supports a subset of the features supported in SQL Server 2022 on Linux, in addition to some features that are currently not supported or available in SQL Server 2022 on Linux (or in SQL Server on Windows).oh wait its not sql server huh
yeah idk, seems like a fork of sorts
when did microsoft create another database engine
https://bornsql.ca/blog/you-can-run-a-sql-server-docker-container-on-apple-m1-and-m2-silicon/
Find the “Features in development” option, and select the “Use Rosetta for x86/amd64 emulation on Apple Silicon” checkbox
now its not even downloading
you need to enable x86 emulation in docker it seems
makes sense.
open the docker dashboard, go to settings
this right?
yep!
make sure you restart the docker engine after applying that change
gotcha
lemme run the command again now
and I suppose verify that virtualization support is turned on
umm
wdym
this is all i have in the general tab
oh im dumb
yeah its checkmarked
😛
yay, its downloading at least
so once its downloaded i run this irght
and i change the password
There is actually a MSSQL arm image
sure
kinda
is there?
It is called something like
Azure SQL edge
yeah we already talked about that
Not documented but I could connect once
its not really SQL server
Oh, sry
i mean, its an SQL database
and it has a subset of SQL Servers features, plus some that are unique to it
My efcore+MSSQL could connect before but I didn't do anything but create table + cruds
Cyberrex
Azure SQL Edge is built on the latest version of the SQL Database Engine. It supports a subset of the features supported in SQL Server 2022 on Linux, in addition to some features that are currently not supported or available in SQL Server 2022 on Linux (or in SQL Server on Windows).
Quoted by
<@105026391237480448> from #MSSQL on Mac help (click here)
React with ❌ to remove this embed.
Yea, I see
Postgres supremacy again
agreed 😄
ahh
again!
am i missing something
the top warning is expected and not a problem, says the guide I found
but the missing argument...
sudo docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=<YourStrong@Passw0rd>" \ -p 1433:1433 --name sql1 --hostname sql1 \ -d \ mcr.microsoft.com/mssql/server:2022-latest
run it?
uhm, yes?
isnt that what this entire thread is about? 😄
haha sry, wasnt sure
woops
same thing
not sure then
might have better luck installing a normal x64 VM
i can try uninstalling everything and trying again
and if that doesnt work then yeah
prob my best option
try rebooting once first
might help
if the engine has gotten into a weird state
docker can be fickle at times
\
xd, now this after restart
... hm
/sql1
?well its from the thing you sent
idk
well, but the slashes are anti-linebreak
I'd expect it to register with the containername
sql1
try docker ps -a
maybe i can try it again but delete the slashes
woohoo!
wait it worked?
so it can create the containers at least
well, it has created them
lets see if it can run them 😄
should there be two tho?
or we want only the sql1
its fine for now
we can remove the other one later
ok
try
docker start sql1
ok
:/
idk what "readlink" means
https://stackoverflow.com/questions/55334380/error-readlink-var-lib-docker-overlay2-invalid-argument
Stack Overflow
ERROR: readlink /var/lib/docker/overlay2: invalid argument
This morning I was getting this error when executing docker-compose up:
docker-compose up
ERROR: readlink /var/lib/docker/overlay2: invalid argument
maybe this?
can you check it to make sure i dont do anything stupid
try
docker start --verbose sql1
"unknown flag --verbose"
hm then thats a docker-compose flag
whatever THAT means haha
docker compose is a tool to run several containers at once
Not all images are available for ARM64 architecture. You can add --platform linux/amd64
to run an Intel image under emulation.
did you do this?dont think so
i dont know where to add it now
at the end
doesnt matter really
you'd add that to the
docker run
commandso rerun the command
ill make an sql2 containter then i guess
and add that
same thing
but it still created it
and docker start sql2 doesnt work
Warning to others: having the --platform linux/amd64
at the end of the command does not work - it seems to be best placed before declaring the image name
try this maybesudo docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=<YourStrong@Passw0rd>" \
-p 1433:1433 --platform linux/amd64 --name sql1 --hostname sql1 \
-d \
mcr.microsoft.com/mssql/server:2022-latest
smth like this?
do you need sudo?
im just typing what Pobiega sent
idk anything about this shit haha
sure try that
that seems fine, and it also said in the feedback that the requested platform was amd64
ok slight progress, at least we dont get the chipset error
yeah but maybe it needed to be specified explicitly?
i mean it was making the containers no problem
just for some reason i cant start them cuz of some invalid argument error
this is a lot of fun :))
i love mac
to be fair, this isnt a mac issue. its an arm64 issue
thats a different processor architecture and not all software is compiled to work with it
im just wondering wth the invalid argument is
on every single guide it works
for arm64
and every forum i check for the readlink thing i dont get a concrete answer
Azure data studio worked for me on mac
Let me know where you're stuck. I setup a .net 4.7.2 inside parallels on a mac.
I may have installed mssql inside the windows container in parallels and used azure data studio to connect to it.
Ahh I may have done it on docker too. Sorry the details are a bit fuzzy, it's been a while
id prefer not to download a vm tbh
im still stuck on this stupid error
Have you tried this?
https://blog.logrocket.com/docker-sql-server/
I prefer docker-compose because it's, composable lol
Kyle Galbraith
LogRocket Blog
How to run SQL Server in a Docker container - LogRocket Blog
You can use Microsoft SQL Server across multiple platforms with Docker. Learn how to launch an SQL Server database inside a Docker container.
remember, this is an M1 mac we are talking about
Yeah, i use a m1 mac
so its an arm64 chipset
Try adding platform: linux/x86_64 inside the container
This is wp but it should work
okay. the sql-server images dont have an arm64 version, so there is some issues with running it under amd64 with emulation
Yeah the
platform
prop should (fingers crossed) alleviate thatCyberrex
Warning to others: having the --platform linux/amd64
at the end of the command does not work - it seems to be best placed before declaring the image name
Quoted by
<@105026391237480448> from #MSSQL on Mac help (click here)
React with ❌ to remove this embed.
we did all that
yup
all that changed was i didnt get the error that it isnt supported
Ahhh damn. Sorry.
but i still coundt run it because of the Error response from daemon: readlink /var/lib/docker/overlay2/l: invalid argument.
One sec, I haven't booted up my work mac in a while lol
Off topic: been a massive fan of windows + WSL2. It's amazing
Yup, it's very good
@stefzcu okay sorry, i remember now, my mssql was inside of parallels. I apologize for adding noise to this issue
yeah i figured
i still dont understand anything, but if it worked for you it owuld have worked for me
i guess i gotta turn on ol' rusty
for my uni course
for windows its as simple as just downloading sql server 2022 right?
Yes, in windows it should just work. Or you can also spend $5 and spin up a DO for it (Disclaimer idk if docker supports mssql)
sry man, im a bit frustrated it cant just work natively
why cant things just work!
You're on a mac, it should just work! (I kid)
Yeah it's def frustrating.
hahaha
well, its because x86/x64 was the dominant architecture for SO LONG
for most usecases
the M1 was quite revolutionary, as its the first really powerful consumer-grade arm64 proccessor
its a really cool piece of hardware, but it does mean some stuff doesnt work with it yet sadly
will there ever be support from microsoft tho
visual studio for mac has been garbage since its inception
I use Rider
for sql server specifically, dunno.
for other thingss, yes
me2
theres no other way
VS for mac is garbage, thats true
but dotnet itself runs fine on arm64
well yeah
i guess
beggars can tbe choosers i guess
Why do you need mssql?
school
yeah
Ahh. I you have a windows machine at home just host a mssql in it and open it up 😄
since i dont know anything, idk if theres like an equivalent to mssql
but im guessing not
well, define "equivalent "
thats my only good option now tbh
there are many other sql server programs
but they have their differences
their SQL dialects are different, and they do some things differently
well yeah, thats what im worried about, if the differences are what i need to pass
exactly
for schoolwork, its safest to just use the versions the school specifies
Why are you trying to avoid parallels? It's been really good for me.
Just curious.
money, and i do have a windows machine, its just a desktop
Ahhh
and ive been enjoying using a laptop
Damn this suggestion is going to suck, why not just remote to your windows machine?
doesnt suck too much, thats literally how I work from home 😄
i didnt wanna make a big deal out of it, because i do have the option to do everything on my desktop, i just would have liked for it to work on the mac
I just remotecontrol my work computer
isnt the delay gonna be horrible
and my desktop has to always be on
delay? 5 ms isnt too much
and yes, the desktop needs to be on.
what program should i use
i might try that
you have a few options. Chrome remote desktop is probably the easiest, and also works with NAT and other restrictive network setups
gotta dip out, best of luck
aight g, thnx for everything
GL!
tyty
its been helpful
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity./close