MySql Connector For .net
How to connect to MySql data base using MySql Connector for .net in Visual Studio
In this article I will show you an easier and efficient way of how one can integrate MySql database and .net
Why to do so ?
Because as we know MySQL is an open source, and its good to work on open souces, as we can customize it as per our need/requirement
And "MySql connectors for .net" is also an open source tool provided by MySql community, so you can customize it too.
You can download the connector & Source code here
http://www.mysql.com/downloads/connector/net/
Ok, now there are two ways to implement MySql connectorFirst
If you have the installation file of the MySql connector:
Then follow the steps
1. Open the setup file and install the MySql Connector
2. After installation is finished, open Visual Studio.
3. Open a new/existing project/file
4. View the "Solution Explorer"
5. In Solution Explorer, right click on the "REFERENCE" folder
6. Click "on Add Reference"
7. An Add Reference Dialog box will open up
8. Under ".NET" catagory, search for " MySql.Data", select it and click "ok"
9. You will see in Solution Explorer, after expanding the Reference Folder, a new reference
"MySql.Data" has been added.
10. Now in your .cs/.vb files include the followilg in "using"
using MySql.Data;
using MySql.Data.MySqlClient;Second
If you have the Source codes of the "MySql Connector for .Net".
{Note: Use this only if you want to customize your MySql Methods, such as the dataapapter or the commandbuilder or etc}
Follow the steps
1. Extract the folder
2. Open Visual Studio
3. Create/Open a new/existing project
4. Go to "File menu" --> Add --> Existing Project
5. A "Add Existing Project" Dialog box will open up, in there browse to the folder which you have extracted earlier.
Inside that folder you will find another folder "MySql.Data"
Inside "MySql.Data" Folder you will find "Provider" Folder
Inside "Provider" Folder you will find "MySql.Data Visual C# Project file"
Click on it and click open.
6. Now view "Solution Explorer", you will find a new project has been added to the solution
7. Now build the MySql.Data Project
(Remember that now you have two projects in your solution. One that you have created or opened previously in Step 2
Second is the MySql.Data Project ,you have to build this project only for now
because it will create a MySql.Data.dll in its \\bin\\debug folder )
8. Add the "MySql.Data.dll" created in step 7 to the reference folder of your project that you have created or opened
9. Now in your .cs/.vb files include the followilg in "using"
using MySql.Data;
using MySql.Data.MySqlClient;
Here the difficult parts are done,
If you have used ADO.Net before using SQLServer as a database, then it will be very easy for you, besause the methods are
all similar to the "System.Data.SqlClient"
For eg:
System.Data.SqlClient MySql.Data.MySqlClient
SqlConnection MySqlConnection
SqlDataReader MySqlDataReader
SqlCommand MySqlCommand
Sql....... MySql.......
If you have any doubts give a response
Cheers
Paul
Reference: http://www.mysql.com/downloads/connector/net/

Hi Diane,
Here is the download link where you can download the installer, but first you have to register.
http://www.mysql.com/downloads/mirror.php?id=393676
cheers
Paul