Skip to content
New issue

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? Sign in to your account

Login failed for user 'sa' on Mac #22

Closed
thearabbit opened this issue Jan 21, 2017 · 12 comments
Closed

Login failed for user 'sa' on Mac #22

thearabbit opened this issue Jan 21, 2017 · 12 comments

Comments

@thearabbit
Copy link

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
Copy link
Collaborator

@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
Copy link
Collaborator

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

@thearabbit
Copy link
Author

Look great, I work fine.
Very thank.

@rameshrohan
Copy link

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
Copy link
Collaborator

Are you using -v in your docker run command?

@arava
Copy link

arava commented Jun 28, 2017

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

@joelGarcia93
Copy link

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
Copy link

@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
Copy link

ume3119 commented Feb 3, 2020

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
Copy link

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
Copy link

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
Copy link

FranciscoFilehubs commented Oct 9, 2022

that working very good @Pwd451EatonStrong

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants