Hello Programmers, here is the article to connect MySQL with visual studio. Microsoft visual studio has nice facility where you can easily connect any database with visual studio. this article i am using MySQL and Visual Studio 2019.
Let’s see the all important steps to connect VS with MySQL.
1.Install two important packages “mysql-for-visualstudio” and “mysql-connector”.
2. Click “Tools” Tab and next Click “Connect to Database”.
Choose “MySQL Database” from Data source and click”Continue” button. see below image.

3.Give MySQL Server name ,Enter User name and Password.
Select or enter a database(sakila) from drop-down box. Click “Test Connection” button. if connection succeeded then click OK. Follow below image.

4.Right click on References–>Add References–>Browse–>give the path–>select “MySql.Data.dll” –>click “Add” button. see below image.

5.Add package “using MySql.Data.MySqlClient. After write any types of codes related with MySQL. see below image.

Happy Programming..Thanks.