I have completed set the sql server linux on docker.
microsoft/mssql-server-linux:2017-latest "/opt/mssql/bin/sqls…" 5 days ago Up 18 minutes 0.0.0.0:1433->1433/tcp sql.server
When I'm using SQL Operations Studio to connect to the server I able to connect it:
Server: localhost
Username: sa
Password: *********
but when I'm changing my default connection string on asp.net core default connection
"DefaultConnection": "Data Source=localhost;Initial Catalog=PandaMarket.Identity;User ID=sa;Password=*********"
I encounter this error message, when performing database update
dotnet ef database update from the terminal.
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 35 - An internal exception was caught)
docker runcommand orcomposefile (if you used that to run the container). Also, it's not clear from the question what are you running inside what container. I assume you're running two containers, one withASP.Net coreand one withSQL Server. Is that right? - Saqib AhmedSQL ID=sayou need to useUser Id=sa. Also, try implicitly use127.0.0.1rather thanlocalhost. - Set