[+/-]
This section provides a gentle introduction to programming with Connector/Net. The example code is written in C#, and is designed to work on both Microsoft .NET Framework and Mono.
This tutorial is designed to get you up and running with Connector/Net as quickly as possible, it does not go into detail on any particular topic. However, the following sections of this manual describe each of the topics introduced in this tutorial in more detail. In this tutorial you are encouraged to type in and run the code, modifying it as required for your setup.
This tutorial assumes you have MySQL and Connector/Net already installed. It also assumes that you have installed the World example database, which can be downloaded from the MySQL Documentation page. You can also find details on how to install the database on the same page.
Before compiling the example code, make sure that you have added
References to your project as required. The References required
are System, System.Data and
MySql.Data.

User Comments
If you're developing code that may need to interact with other data base servers, you may want to use the common data base classes rather than the mySql-specific ones.
using System.Data.Common;
...
DbProviderFactory fac = DbProviderFactories.GetFactory("MySql.Data.MySqlClient");
DbConnection con = fac.CreateConnection();
con.ConnectionString = "connection string";
con.Open();
etc.
Add your own comment.