Vs Code connecting to MySQL database
1. Development tools vs Code
2. Computer system Windows 10 professional edition
3. In the development process, we often use the database. In order to save space and reduce the installation of other programs, the development tool I choose is vs code, and the database is mysql. I’m going to talk about how vs Code connects to MySQL database.
4. First install the corresponding plug-in:
MySQL / MySQL Syntax
4-1: after installation, click MySQL in the figure below
4-2: then fill in the corresponding information:
4-3: after filling in the corresponding information, we may get the following result:
4-4: view the data of a table below the database. The operation method is as follows: (right click and select top 1000)
4-5: right click Select Top 1000 of a table, and the effect is as follows:
//After writing the SQL statement, how to execute it? The shortcut key is Ctrl + Alt + E
The above is method 1 and method 2 is as follows.
5. Install plug-in:
5-1: after installing the plug-in
5-2: after filling in the corresponding information, click Connect. When the connection is successful, you will see the following:
5-3: click the icon:
5-4: the operation is as follows:
5-5: select database:
5-6: associate the following tables in the database:
5-7: query table data.
6. The tutorial of this issue is over here. Do you feel very helpful? I hope it will help you. Let’s work hard to get to the top!