Can I connect to a ubuntu server, that is running mysql using ado.net or do I need a special driver?
views:
16answers:
2
+1
A:
You'll need the MySQL Connector/NET ADO.NET driver.
Once installed, it behaves almost identically to Microsoft's native System.Data.SqlClient
. Instead of importing that namespace, use MySQL's:
using MySql.Data.MySqlClient;
...
MySqlConnection DB = new MySqlConnection("SERVER=...");
Basically, just prepend My
where you'd use any of the MS SqlClient
classes.
josh3736
2010-08-19 21:56:15