I\'m having trouble with my code to access a MySQL Database. Everytime I try to open my connection, a System.TypeInitializationException
is thrown by MySq
In my case, it raised error only in production. It was due to a wrong assumption in the MySql.Data package. It for some reason seems to demand to be in the same folder as the orchestrating dll (it was referencing another dll which was referencing MySql). I resolved my issue by removing MySql.Data and instead installing MySqlConnector package as suggested in here.