After you have the drivers installed, setup your DSN to connect to your remote mysql database. You will likely need to add your ip to the Remote Database Access Hosts depending on how the Mysql server is configured.
You will then be able to use code as follows (replace the DSN name “test” with the name you provide when creating the DSN):
using System.Data.Odbc;
OdbcConnection DbConnection = new OdbcConnection(“DSN=test”);
DbConnection.Open();
Comments
Leave a comment Trackback