Documentation Home
MySQL Shell for VS Code


MySQL Shell for VS Code  /  ...  /  Configure a Basic MySQL Database Connection

Pre-General Availability: 2024-03-18

4.2.2 Configure a Basic MySQL Database Connection

To configure a basic connection to a MySQL server instance running locally or remotely:

  1. Select mysql from the Database Type list. Provide a caption and a description to identify the connection.

  2. In the Basic tab, enter the host name, protocol, user account information, and password.

    • Host Name or IP Address

      The host name or IP address of the MySQL server. The host name localhost might resolve to 127.0.0.1 or ::1 on your host, so note this when checking permissions.

    • Protocol

      • mysql

        Establishes the connection using classic MySQL protocol.

      • mysqlx

        Establishes the connection using X Protocol.

    • Port

      The TCP/IP port on which MySQL Server is listening. The default values are:

      • 3306 for classic MySQL protocol

      • 33060 for X Protocol

    • User Name

      The MySQL user account to use for the connection.

    • Store Password

      Optional password for the account used. If you enter no password here, you are prompted to enter the password when the MySQL Shell for VS Code extension attempts to establish the connection. MySQL Shell for VS Code can store the password for a connection using a secret store, such as a keychain.

    • Clear Password

      Removes a stored password.

    • Default Schema

      When the connection to the server is established, this option sets the schema that becomes the default schema for use in other parts of MySQL Shell for VS Code. For simplicity, you can leave the default schema value blank during the initial setup and set the default value later, as needed.

  3. Click OK.