I have installed and set up MySQL Server in my Windows computer. As I have installed MySQL for Visual Studio, I'd like to connect MySQL database in Visual Studio, so it will be easier for me to work with the database while I am developing the application, as how I do with MS SQL database always.
1. Open Visual Studio.
2. Expand Server Explorer.
3. Click on Connect to database icon on top.
4. Change the Data Source to MySQL Database.
(You'll see this option if you have installed MySQL for Visual Studio)
5. Enter the information required to connect to database.
Server name: Enter the Server name as localhost if you are connecting the database locally
Username & password: Enter the user name and password that you've defined while setting up the MySQL Server.
Database name: the database that you wish to connect
Click on Test Connection button to test if the connection to database has been successful.
I refer to this tutorial to get my MySQL database connected in Visual Studio.