如何连接到MySQL数据库?

如何连接到MySQL数据库?

问题描述:

我很新的C#编程,但是希望能够访问MySQL数据库(不具备MS SQL钱)

I'm very new to C# programming but would like to be able to access MySQL Databases (do not have the money for MS SQL)

不过,我有一个问题;我知道你们都需要有的MySQL Connector / NET和MySQL的为Visual Studio为开发C#应用程序,但不执行谁安装应用程序的人也需要他们? (难道我只能释放连接器的DLL与程序?)

However I have one question; I know you are required to have "MySQL connector/NET" and "MySQL for Visual Studio" for developing the C# application, but does the person who installs the application also require them? (Is it possible I can just release the connector DLL with the program?)

感谢

编辑:是两者所需的最终用户或只是连接器?还有什么他们需要?

Are both of them required for the end-user or just the connector? Is there anything else they would need?

您可以使用软件包管理器将其添加为包中,它是最容易做的方式。你不需要任何其他与MySQL数据库的工作。

you can use Package Manager to add it as package and it is the easiest way to do. You don't need anything else to work with mysql database.

或者你也可以在软件包管理器控制台命令之下运行

Or you can run below command in Package Manager Console

PM> Install-Package MySql.Data

的NuGet Mysql.Data ​​ STRONG>