Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement. We’ll occasionally send you account related emails.
Already on GitHub?
to your account
It seems the documentation on how to start the Linux based sql server container contains a bug!
The documentation states you need to start the container using the following command-line:
docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=yourStrong(!)Password' -p 1433:1433 -d mcr.microsoft.com/mssql/server:2019-latest
But this is wrong because it will not set the password for SA
It took me hours to discover the environment variable actually used to set the SA password is 'MSSQL_SA_PASSWORD'
So when you use the following command line it just works
docker run -e 'ACCEPT_EULA=Y' -e 'MSSQL_SA_PASSWORD=yourStrong(!)Password' -p 1433:1433 -d mcr.microsoft.com/mssql/server:2019-latest
/opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P 'yourStrong(!)Password'
This will give you the following error:
Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : Login failed for user 'SA'..
Now remove the container and try again, but replace the -e 'SA_PASSWORD=yourStrong(!)Password' with -e 'MSSQL_SA_PASSWORD=yourStrong(!)Password'
Try the same steps again, and voila, you are connected to the SQL server.
The text was updated successfully, but these errors were encountered:
No branches or pull requests