how to get new mysql connector for c#

假如想象 提交于 2019-12-25 06:27:50

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!