How can I diagnose Entity Framework migration errors?

I have a project that uses Entity Framework 6.1.3 and uses the MySQL 6.9.9 connector with MySQL 5.6.x DB. I have MySQL on Ubuntu 16.04 on a remote image, and I have a corresponding Docker image running on my local workstation.

Image Docker works. I can use the EF Update-Database command in my Docker image. I can run my application, and all the SQL stuff happens as it should. But nothing works on the remote. From the beginning, I get a timeout error when I run Update-Database from the package manager console in Visual Studio 2015.

However, I can connect to the remote image using DataGrip on my workstation and execute all the same SQL commands that are executed by Update-Database. In my opinion, this eliminates network / firewall / configuration / resolution issues. This points to the accusatory finger in Visual Studio, Powershell, and Entity Framework.

How do I diagnose what happens with the Update-Database team?

+6
source share
1 answer

Assuming your port is MySQL 3306, when you start docker, try publishing the port:

docker run -d -p 3306:3306 my-mysql-image 

Run VS after and see if this fixes your problem.

0
source

All Articles