tags:

views:

28

answers:

2

For some reason I can't seem to get the MySQL Net Connector to work with C# outside of the IDE. I have a very simple program working just fine in the IDE (connecting to the database and everything) but when I publish the code and run the .application file (on my local computers desktop or off the company server) it says it can't connect to any of the specified MySQL hosts.

Any help would be greatly appreciated! :(

Thank you

+1  A: 

I would double check all your references, and make sure you have the MySQL Net Connector in the GAC.

Meiscooldude
MySQL.data is in the reference list and set to "copy local" =/. I've installed the MySQL Net Connector again via the Windows installer, which is supposed to register it in the GAC. Still no luck.
MTBPatriot
How about your connection string? Also, is there a difference in account being used to connect to MySQL?
Meiscooldude
Turns out it was a permissions issue. The account suggestion helped me find it. Thanks for your help!
MTBPatriot
+1  A: 

Check that the MySQL provider is properly declared in the machine.config file (in the DbProviderFactories element). You can also declare it in the web.config instead

Thomas Levesque