问题
I have an application that has been using the MySQL connector without problem until recently. I have been packaging MySql.Data.dll with each client app installation. Now I get error: Unable to connect to any of the specified MySQL hosts. So I'm thinking I need new MySQL connector. So I go to http://www.mysql.com/products/connector/ and see there is no longer one for c sharp. Then I go to http://dev.mysql.com/tech-resources/articles/mysql-installer-for-windows.html and see that I have to install MySQL on my developer box and possibly every client this application is installed on. I really hope I'm missing something. How do I get a new MySql.Data.dll to include as a reference in my c sharp app? Thanks in advance.
回答1:
You can get MySQL.Data from NuGet:
Install-Package MySql.Data
If you must get it from MySQL's website directly, it's still there. It's actually the top item on the page you linked, it's just called "ADO.NET Driver for MySQL (Connector/NET)".
来源:https://stackoverflow.com/questions/30268338/how-to-get-new-mysql-connector-for-c-sharp