How to operate MySQL with Visual Studio? The method of connecting MySQL database in Visual Studio

Time:2019-9-10

What is MySQL? How to use Visual Studio to operate MySQL? MySQL is the most popular relational database management system and one of the best RDBMS applications in Web applications. As an open source software, MySQL can greatly reduce the total cost of ownership. Visual Studio is also our common development tool, so how to operate MySQL through Visual Studio? See the detailed steps for connecting MySQL databases in Visual Studio.

Software Name:
Visual Studio 2010 Ultimate VS 2010 Chinese Flagship Edition with KEY
Software size:
2.5GB
Update time:
2015-01-07

Software Name:
MySQL v6.0.11 64-bit for Windows Official Edition (with installation tutorials)
Software size:
43.4MB
Update time:
2017-10-09

Software Name:
MySQL v6.0.11 32-bit for Windows Official Edition (with installation tutorials)
Software size:
42.2MB
Update time:
2017-10-09

Software Name:
Mysql for visual studio (VS Connect MySQL Tool) v1.2.8 Official English Installation Edition
Software size:
9.03MB
Update time:
2018-05-17

How to operate MySQL with Visual Studio?

1. Install MySQL, open Visual Studio, and click on Server Explorer in View, as shown in the following figure:

2. Find the Data Connection in Server Explorer, right-click on the Data Connection and click on the Add Connection in the pop-up box, as shown in the following figure:

3. Select MySQL Database in the pop-up box and click Continue, as shown in the following figure:

4. Enter the server name (default is localhost), username, password and data set name in the pop-up box. Click on the test connection. If there is no error, the connection will succeed and click OK. If you make an error, check your settings.

5. Here’s another explanation. If the port of your database is set to 3306 (default), it can be executed according to step 4. If the port of your database is changed, for example, to 3307, then click Advanced on the basis of step 4 and change the port to corresponding 3307. As shown in the following figure:

6. On the basis of step 4 and 5, click on the test connection. If the connection is successful, the following box will pop up. If the connection is unsuccessful, the box of “error”, error code and error description will pop up. If you don’t understand what the meaning is, you can see the detailed description of the error code in the help document. Look back and examine the problem.

7. If the connection is successful, the name of the data set just created will be displayed in Server Explorer, as shown in the following figure

At the end of the article, the above is about how to use Visual Studio to operate MySQL? The method of connecting MySQL database in Visual Studio, according to the above method can use Visual Studio to operate MySQL oh!

Relevant recommendations:

How does Navicat connect mysql? Navicat Connect Mysql Detailed Picture and Text Tutorial

Apache can start in XAMPP, but MySql can’t start the solution

Detailed illustration of SQL Server importing data to MySQL