© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago•
18 replies
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;"
  }
  "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 ....
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

❔ change timezone of aspnet docker container
C#CC# / help
3y ago
❔ Trouble moving from MVC 5 to Aspnet Core
C#CC# / help
4y ago
How to start test inside docker container from app?
C#CC# / help
2y ago
✅ aspnet core not recognizing images
C#CC# / help
3y ago