Connect to remote MySQL database with Visual C#

前端 未结 5 859
花落未央
花落未央 2021-01-20 19:39

I am trying to connect to a remote MySQL database using Visual C# 2008 Express Edition. Is there a way to connect using the editor, or do I have to code the connection manua

5条回答
  •  情话喂你
    2021-01-20 20:14

    You will have to code the connection manually to connect to a remote MySQL database using Visual C# 2008 Express Edition.

    VS 2008 Express (and VS 2005 Express too) doesn't allow you to use MySQL .Net Provider through the Data Source Dialog. The non-Express edition allow you to do the same.

    To use MySQL in VS Express, you will have to include a reference to the MySQL DLLs. If you have installed the MySQL .Net Provider, the DLLs will be in C:\Program Files\MySQL\MySQL Connector Net x.x.x). Or copy the DLLs to the Bin folder of your project. After including the DLLs, you can make a ConnectionString to connect to the remote MySQL Database.

    The MySQL .Net Provider can be found here

    A similar question was asked in thread 396593 here

提交回复
热议问题