Greatguy
Greatguy

Reputation: 101

How to connect to MySQL server from Visual Studio Code

I recently downloaded the MySQL server and want to connect to it using VSCode, after i installed the VSCode extension, i still have little idea on how to connect to the server/database. All the guides online seem to cover Visual Studio C++.

Upvotes: 9

Views: 37350

Answers (3)

farchettiensis
farchettiensis

Reputation: 49

Been a while, but for those encountering the issue and who are trying to connect to a remote server with a SSL certificate, I recommend the extension MySQL management tool (by Jun Han).

Other popular extensions I tried didn't have an option to insert the path to the certificate (such as SQL Tool).

After installing it, it will appear on the File Explorer Menu. You then have to click the "+" button to add a connection, and it will prompt you for the host, password, and path to the certificate. Pretty straightforward.

My database is a MySQL 8.0 hosted on Azure.

Upvotes: 0

Hemit Patel
Hemit Patel

Reputation: 1

Use this extension. I tried many of them but they didn't seem to connect.

  • Make sure you first have downloaded MySQL Community Server on your machine.
  • Then go ahead and temporarily download Workbench just to easily get the credentials for your connection.
  • Then use this cweijan.vscode-mysql-client2 extension!

Hope this helps

Upvotes: 0

René Höhle
René Höhle

Reputation: 27325

When you install the plugin vscode-database you have some buttons in the footer menu bar to connect to your database. When you open the plugin there is a short tutorial how to connect.

https://marketplace.visualstudio.com/items?itemName=bajdzis.vscode-database

Upvotes: 5

Related Questions