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

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 ASP.Net Core
 
2. Right click on it and click Install.
Download, install and reference MySQL Connector in ASP.Net Core
 
3. Simply click on Next.
Download, install and reference MySQL Connector in ASP.Net Core
 
4. You can browse the location where you want to save the MySQL Connector.
Download, install and reference MySQL Connector in ASP.Net Core
 
5. After specifying location, click on Install Button.
Download, install and reference MySQL Connector in ASP.Net Core
 
6. Once the installation is completed, click on Finish Button.
Download, install and reference MySQL Connector in ASP.Net Core
 
Finally, navigate to the folder location (see step 4) where you have installed the MySQL Connector.
Download, install and reference MySQL Connector in ASP.Net Core
 
 

Adding reference of MySQL Connector in ASP.Net Core project

1. Inside the Solution Explorer, expand your project and right click on Reference of your Project and then click on Add Reference.
Download, install and reference MySQL Connector in ASP.Net Core
 
2. Then, inside the Reference Manager window, click on Browse button.
Download, install and reference MySQL Connector in ASP.Net Core
 
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 ASP.Net Core
 
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 ASP.Net Core
 
Finally, the MySql.Data DLL is now referenced and you can now use it in your project.
Download, install and reference MySQL Connector in ASP.Net Core
 
 


Other available versions