microsoft / mssql-docker

Official Microsoft repository for SQL Server in Docker resources
MIT License
1.74k stars 759 forks source link

Login failed for user 'sa' on Mac #22

Closed thearabbit closed 7 years ago

thearabbit commented 7 years ago

I bas on Mac. 1- Run docker run --name mssql-container -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=123456' -p 1433:1433 -d microsoft/mssql-server-linux. It show

Microsoft(R) SQL Server(R) setup failed with error code 1. Please check the setup log in /var/opt/mssql/log for more information.

2- And then I stop and start again, I work

~ docker ps -a
CONTAINER ID        IMAGE                          COMMAND                  CREATED             STATUS                    PORTS                    NAMES
43db0fce3c75        microsoft/mssql-server-linux   "/bin/sh -c /opt/mssq"   3 minutes ago       Up 2 minutes

3- Connect with

~ mssql -s localhost -u sa -p 123456 -o 1433
Connecting to localhost...
Error: Login failed for user 'sa'.

Please help me.

twright-msft commented 7 years ago

@thearabbit '123456' may not be a sufficiently complex password. Please stop/remove your current container and try running a new container using a more complex password.

twright-msft commented 7 years ago

@thearabbit Also, you shouldnt need to pass the -o parameter to the mssql command if you are using the default port, 1433.

thearabbit commented 7 years ago

Look great, I work fine. Very thank.

rameshrohan commented 7 years ago

Hi Guys , I am still having the issue please can someone help me on this .

vvvvvv-MBP:~ xxx$ mssql -s localhost -u sa -p PWSD@Test123 Connecting to localhost... Error: Login failed for user 'sa'. vvvvvv-MBP:~ xxx$

twright-msft commented 7 years ago

Are you using -v in your docker run command?

arava commented 7 years ago

Thanks Guys.. @twright-msft pointed to the right , password issue.. @rameshrohan Test123 is not a complex password..

joelGarcia93 commented 6 years ago

Im using this password "reallyStrongPwd1239821Anbasjjh832Kaskhsd" and Im getting same issue

MacBook-Air-de-Joel:~ joelgarcia$ mssql -s localhost -u sa -p reallyStrongPwd1239821Anbasjjh832Kaskhsd Connecting to localhost... Error: Login failed for user 'sa'.

NdodaEnde commented 6 years ago

@thearabbit Also, you shouldnt need to pass the -o parameter to the mssql command if you are using the default port, 1433.

Hi, the docker connected well..it runs. but when i try to run the sql operations studio it gives me the 'Login failed for user ....' What am i doing wrong..been trying everything...nothing

ume3119 commented 4 years ago

Ran the container using following command: docker run -d --name MSSQLLOCALCOMMUNITY -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=MyStrongPassword@123' -p 1433:1433 microsoft/mssql-server-linux

But when i try to connect to db it yields: Error: Login failed for user 'MSSQLLOCALCOMMUNITY'.

josinodaz commented 2 years ago

still getting same error, after having tried multiple times.If anyone could identify whats wrong from my terminal below🥲

mac@Ghosts-MacBook-Pro ~ % docker images REPOSITORY TAG IMAGE ID CREATED SIZE mcr.microsoft.com/mssql/server 2019-latest 9ab26f8e5685 5 weeks ago 1.61GB mac@Ghosts-MacBook-Pro ~ % docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES mac@Ghosts-MacBook-Pro ~ % sudo npm install -g sql-cli Password: npm WARN config global--global,--localare deprecated. Use--location=global` instead. npm WARN deprecated sprintf@0.1.5: The sprintf package is deprecated in favor of sprintf-js. npm WARN deprecated core-js@1.2.7: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.

changed 48 packages, and audited 49 packages in 6s

1 package is looking for funding run npm fund for details

found 0 vulnerabilities mac@Ghosts-MacBook-Pro ~ % docker run --name GHOST -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=1Unitedrange22’ -e 'MSSQL_PID=Developer’ -p 1433:1433 -d mcr.microsoft.com/mssql/server:2019-latest 5db465b250a8da5e47db009efa694dec025dd30cd0641fd5df84eb062774c424 mac@Ghosts-MacBook-Pro ~ % mssql -u sa -p 1Unitedrange2022 Connecting to localhost... Error: Login failed for user 'sa'.`

FranciscoFilehubs commented 2 years ago

All the logic is in the password, that's why it doesn't log in, it lasted 3 days and I was never able to log in until the day I found these notes, which was the key. exactly was key. It must be very complex and long. mine was the following to be able to practice the change later @Pwd451EatonStrong

FranciscoFilehubs commented 2 years ago

that working very good @Pwd451EatonStrong