Home >Development Tools >VSCode >How to connect to mysql database in vscode?
How to connect to mysql database in vscode? The following article will introduce to you how to connect vs code to mysql database. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to everyone.
Related recommendations: "vscode basic tutorial"
1. Development tools vs code
2. Computer system Windows 10 Professional Edition
3. During the development process, we often use databases. In order to save space and reduce installation For other programs, the development tool I chose is vs code, and the database is mysql. Next I will talk about how to connect vs code to mysql database.
4. First install the corresponding plug-in:
MySQL / MySQL Syntax
4-1: After the installation is complete, click mysql in the picture below
4-2: Then fill in the corresponding information:
4-3: After filling in the corresponding information, we will probably get something like this Result:
4-4: View the data of a table below the database. The operation method is as follows: (right-click and select select top 1000)
4-5: Right-click select top 1000 of a table, the effect is as follows:
//After writing the sql statement, how to execute it What? The shortcut key is ctrl alt e
. The above is method one, and method two is as follows.
5. Install the plug-in:
vscode-database
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 the database:
5-6: Associate the database below Corresponding table:
5-7: Query the data of the table.
6. This tutorial is over here. Is it helpful? I hope it will be helpful to you. Let us work hard to reach the top together!
For more programming-related knowledge, please visit:
The above is the detailed content of How to connect to mysql database in vscode?. For more information, please follow other related articles on the PHP Chinese website!