Hi all!

I am trying to connect to a remote MySQL database. This database is located on my LAN at the address 192.168.1.2. I am using MySQL Connector/ODBC 3.51 (MyODBC 3.51) for the connection.


The connection string that I am using is the following-

Driver={MySQL ODBC 3.51 Driver};Server=192.168.1.2;Database=mydb;User=root; Password=;Option=3;


The error message that I get is not too intuitive - SystemEventArgs

Has anybody connected to a remote MySQL database in VB.NET?

MySQLConnectionString = String.Format("Server={0};Database={1};Uid={2};Pwd={3};Connect Timeout=30;", pServerName, pDatabase, pUserName, pPassword)

MySqlADOConnection = New MySqlConnection
MySqlADOConnection.ConnectionString = MySQLConnectionString
MySqlADOConnection.Open()

and do not forget to add mysql.data as a reference.
I have been using MySQL Connector Net 5.2.2...

Anybody tried it with the ODBC Driver?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.