The server was not found or was not accessible.
![get sql on mac get sql on mac](https://www.vsm365.com/VSM365/media/VSM365/Product/Navicat/Navicat-SQL-Server-Mac/sqlserver-mac-Code-Completion05.png)
(0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. Info: Įntity Framework Core 2.0.1 initialized 'ApplicationDbContext' using provider '' with options: None Using '/Users/mymacname/.aspnet/DataProtection-Keys' as key repository keys will not be encrypted at rest. I'm not sure what my machine name would be but once I change and save the connection string line in appsettings.json and run the command I get: :/$ /opt/mssql-tools/bin/sqlcmd -S localhost -U SAġ> CREATE TABLE Inventory (id INT, name NVARCHAR(50), quantity INT)Ģ> VALUES (1, 'banana', 150) INSERT INTO Inventory VALUES (2, 'orange', 154) ġ> SELECT * FROM Inventory WHERE quantity > 152 Ĭontainer running, MSSQL and SQLCMD works, but to connect to this database, what are my options in terms of changing my appsettings.json connectionstring or do I have to run this project within a docker container as well? I was under the impression I could connect since I'm able to connect via Azure Data Studio just fine, why wouldn't I be able to hit the db from VS for Mac- I'm guessing I'm forming my connection string incorrectly, I've tried several things with similar results. :/$ /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P :/$ /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P "" ➜ ~ susudo docker exec -it sql1 /opt/mssql-tools/bin/sqlcmd d /mssql/server:2019-latestĠe42aac8bf8ed47712859a9a70ef44b947335dbb4c15cd0011c2c7d0274d227fĬONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMESĠe42aac8bf8e /mssql/server:2019-latest "/opt/mssql/bin/perm…" 15 seconds ago Up 12 seconds 0.0.0.0:1433->1433/tcp sql1ī0f9a3918a16 mysql:latest "docker-entrypoint.s…" 3 weeks ago Exited (1) 3 weeks ago interesting_coriħ51d5d0485a4 wordpress:latest "docker-entrypoint.s…" 3 weeks ago Exited (255) 2 weeks ago 0.0.0.0:12->80/tcp infallible_zhukovskyĦ26c2975726c wordpress "docker-entrypoint.s…" 3 weeks ago Created some-wordpress Mcr.micsudo docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=" ~ sudo docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=" Status: Downloaded newer image for /mssql/server:2019-latest
![get sql on mac get sql on mac](https://s33046.pcdn.co/wp-content/uploads/2021/04/docker-desktop-for-mac-download.png)
#GET SQL ON MAC PASSWORD#
I thought it may have been my password so I repulled mssql in docker below. Here’s my setup and confirmation of sql1 working with TestDB and my project root is src with appsettings.json contained within root as per usual, just a basic project.
#GET SQL ON MAC UPDATE#
When I run dotnet ef database update I get thrown and error. net core 2 project from a friend i’m wanting to connect to and simply run update-database or dotnet ef database update or even a migration on.
![get sql on mac get sql on mac](https://www.quackit.com/pix/stock/sql_server_500x200.gif)
#GET SQL ON MAC MAC#
I have a Docker Ubuntu container running /mssql/server:2019-latest called sql1 on my Mac I’m missing something here, and if someone could help clarify I’d greatly appreciate it: