In this article I will explain a simple tutorial with example, how to download, install and reference the MySQL Connector library in C# and VB.Net.
 
 

Downloading MySQL Connector

You will need to download the Setup file of MySQL Connector from the following link.
 
 

Installing MySQL Connector

1. After downloading, you will get the following mysql-connector-net-9.0.0.msi file as shown below.
Download, install and reference MySQL Connector in C# and VB.Net
 
2. Right click on it and click Install.
Download, install and reference MySQL Connector in C# and VB.Net
 
3. Simply click on Next.
Download, install and reference MySQL Connector in C# and VB.Net
 
4. You can browse the location where you want to save the MySQL Connector.
Download, install and reference MySQL Connector in C# and VB.Net
 
5. After specifying location, click on Install Button.
Download, install and reference MySQL Connector in C# and VB.Net
 
6. Once the installation is completed, click on Finish Button.
Download, install and reference MySQL Connector in C# and VB.Net
 
Finally, navigate to the folder location (see step 4) where you have installed the MySQL Connector.
Download, install and reference MySQL Connector in C# and VB.Net
 
 

Adding reference of MySQL Connector in Windows Forms project

1. Inside the Solution Explorer, expand your Project and right click on References and then click on Add Reference.
Download, install and reference MySQL Connector in C# and VB.Net
 
2. Then, inside the Reference Manager window, click on Browse button.
Download, install and reference MySQL Connector in C# and VB.Net
 
3. Navigate to the folder location (see step 4 – Installation section) where you have installed the MySQL Connector and look for the MySql.Data file and select it.
Download, install and reference MySQL Connector in C# and VB.Net
 
4. The MySql.Data DLL is now visible in the Reference Manager window. Select it and click OK button as shown below.
Download, install and reference MySQL Connector in C# and VB.Net
 
Finally, the MySql.Data DLL is now referenced and you can now use it in your project.
Download, install and reference MySQL Connector in C# and VB.Net