Unable to connect the MYSQL in Docker

$ mssql -u sa -p myPassword@12345
Connecting to localhost…
Error: Failed to connect to localhost:1433 - connect ECONNREFUSED 127.0.0.1:1433

I am getting the Error. Please give solution for me . I am using windows 10 - 64 bit and 4 GB RAM

The first step to a solution would be that you show us how you start the database. And then it’s not clear if you speak about MySQL (title) or MSSQL (command).

Thanks for reply -

  1. First i started the Docker

  2. Enter the command - docker run -d --name manivannan -e ‘ACCEPT_EULA=Y’ -e ‘SA_PASSWORD=myPassword@12345’ -p 1434:1434 mcr.microsoft.com/mssql/server:vNext-CTP2.0-ubuntu
    6bb977b6c093bf73a9411e482eb557700aaa9b1334a8725ea64720725a3830f7

  3. docker ps -a ---- Container has displayed

  4. Then mssql -u sa -p myPassword@12345

  5. Then Connecting to localhost…
    Error: Failed to connect to localhost:1433 - connect ECONNREFUSED 127.0.0.1:1433

  • ALERT MESSAGE IS DISPLAYED - I am getting this kind of alert message . Please guide me. Thanks

You publish port 1434 and connect to 1433.

Thanks for Reply, I tried same 1434 and 1433 but i am getting the same error like

Error: Failed to connect to localhost:1433 - connect ECONNREFUSED 127.0.0.1:1433

It’s not possible for me to give a clear answer to this question. I was starting to write because of the “MYSQL” in the title (could you please correct it?). I’d recommend that you follow the tutorial on docs.microsoft.com and first open bash in the container. Only all of these commands work you can move to ’ Connect from outside the container’.