The DATABASE CONNECTIONS view enables you to make, save, and manage connections to a MySQL DBMS, a SQLite database, or an Oracle Cloud Infrastructure (OCI) compute instance through MySQL Database Service.
The DATABASE CONNECTIONS view provides:
Database and extension actions
You can perform the following actions from the DATABASE CONNECTIONS view toolbar:
Click + to add a new database connection.
Click the DB Connection Browser icon to open a tab showing your existing database connections.
Click the Reload icon to reload the connection list.
Click the Collapse All icon to show the connection names only and hide all connection tree items, such as schemas.
-
Click
...
to open a context menu with the following actions:-
Closes all MySQL Shell tabs and restarts the underlying process. Afterwards, the extension attempts to establish a connection automatically.
-
Connects to a MySQL Shell instance using its address. If you leave the address blank, the extension attempts to open MySQL Shell from a local installation.
-
Opens the Welcome Wizard to access helpful links or to install the MySQL Shell certificate and reload the VS Code window.
-
Resets the extension by deleting the web certificate and your settings directory.
-
File Bug Report
Opens a new bug report in the
Shell VSCode Extension
category or copies the link for later use. It is possible to configure trusted domains from a Windows platform using this action.
-
Connection actions
Named connections are listed under the DATABASE CONNECTIONS view
and each connection contains a hierarchy of data objects. Click
>
to expand the list of:
Schemas with the
mysql
schemas hidden by defaultTables, views, routines, and events
Table columns, indexes, foreign keys, and triggers
You can perform the following actions for each connection:
Click the Connect icon (
>
) to make a connection, open DB Notebook, and execute the\about
command.Click the Reload icon to reload database information.
Right-click each connection to perform the following actions:
-
Connects to MySQL, open a tab for DB Notebook, and execute the
\about
command. This action closes a currently active connection tab. -
Connects to MySQL and opens DB Notebook in a new tab. This action does not close any open connection tabs.
-
To set a default connection, you must install the extension without using a standalone MySQL Shell instance.
SQLiteThe
option is not available for SQLite database connections. -
Opens the Database Connection Configuration dialog for the connection.
-
Opens the Database Connection Configuration dialog with copy of the current connection's values. You must rename the duplicate connection.
NoteThe connection name of the duplicate is identical to the original.
-
Removes the connection from the DATABASE CONNECTIONS view.
-
Adds the
mysql
schema, which is not visible by default.SQLiteThe
option is not available for SQLite database connections. -
Opens a file browser from which you can select the directory that contains a MySQL Shell dump.
-
Opens a file browser from which you can select the directory that contains a MySQL Shell dump.
SQLiteThe
option is not available for SQLite database connections. -
Opens a MySQL Shell Consoles tab using the connection and executes the
\about
command. The GUI Console toolbar includes a drop-down session list. Connection status appears under the toolbar.SQLiteThe
option is not available for SQLite database connections. -
Opens the MySQL REST Service (MRS) Developer's Guide in a new tab.
SQLiteThe
option is not available for SQLite database connections. -
Creates a MySQL REST Service schema and reports the action under the MYSQL SHELL TASKS view.
SQLiteThe
option is not available for SQLite database connections.
Schema actions
Right-click each schema to perform the following actions:
-
Opens your system's file browser from which you can select a directory to hold the compressed schema files. The extension reports this action under the MYSQL SHELL TASKS view. The output files are optimized for use with the MySQL DBMS.
-
Opens your system's file browser from which you can select a directory to hold the compressed schema files. The extension reports this action under the MYSQL SHELL TASKS view. The output files are optimized for use with MySQL Database Service in OCI.
-
Copies to your system's clipboard the name or
CREATE DATABASE
statement for the schema. -
Opens the MySQL HeatWave Cluster dialog from which you select one or more schemas to load.
-
Opens the MySQL REST Service dialog from which you set configuration values for the new REST schema.
-
Executes the
DROP DATABASE
statement on the selected schema, which drops all tables in the schema and deletes the schema. You need theDROP
privilege on the schema.Be very careful with this statement!
Table actions
Right-click each table to perform the following actions:
-
Executes the
SELECT * FROM '
query and publishes the results in DB Notebook. If the language mode is not SQL when you select this action, the extension calls theschema-name
' 'table-name
'\sql
command first. -
Provides basic authentication for the specified table (see Section 3.2.2, “MySQL REST Service”).
-
Copies to your system's clipboard the name or
CREATE TABLE
statement for the table. -
Executes the
DROP TABLE
statement on the selected table, which drops the table definition and all data, all its partitions, all data stored in those partitions, and all partition definitions associated with the dropped table, and all triggers. You need theDROP
privilege on the schema.