C#C
C#17mo ago
Tiltyboi

✅ Cannot connect to mysql docker container db from AspNet Core App

A AspNet Core App using EF-Core cannot connect to local db container running mysql. I have made sure it forwards the correct port (default 3306). ASet my connection string in my app to:
  "ConnectionStrings": {
    "SqlConnection": "Server=172.17.0.2;Database=test-db;User Id=root;Password=my-secret-pw;"
  }

So why doesnt it work? I alsot ried setting server to localhost and 127.0.0.1 ....
Was this page helpful?