Documentation Home
MySQL Shell for VS Code


MySQL Shell for VS Code  /  Database Connections and DB Notebooks

Pre-General Availability: 2024-03-18

Chapter 4 Database Connections and DB Notebooks

This chapter provides an overview of connection-based DB Notebooks in MySQL Shell for VS Code. DB Notebooks are notebook-interface-styled and script-style editors for working with databases. A DB Notebook editor enables you to:

  • Create and manage database schema objects

  • Write SQL queries and scripts

  • Work with data

All of the editing activity occurs within a named connection tab, which is your main interface for working with data on a single MySQL server. A connection tab is opened from the DATABASE CONNECTIONS view (see Connection actions) after the connection has been configured. You can open a named connection in a separate, independent tab or use a single tab to list multiple connections. The extension organizes your open DB Notebook and single-language script editors by their connection name under the OPEN EDITORS view. The following figure shows an open notebook editor for a connection named Basic.

Figure 4.1 Database Connections with an Open DB Notebook

Content is described in the surrounding text.

Connection-oriented editing

  • Notebook editor for notebook-interface-styled documents

    Opens as the default editor each time you establish a connection. You can switch between the supported languages within a DB Notebook.

    Supported languages: SQL (MySQL and SQLite), JavaScript, and TypeScript.

    Supported protocols: classic MySQL protocol (mysql) and X Protocol (mysqlx).

  • SQL script, TS script, and JS script editors for long documents

    Opens new or existing single-language scripts (SQL, TypeScript, and JavaScript) and attaches each added script file to a connection.

    Supported file extensions: .sql, .ts, and .js.

MySQL administration