Documentation Home
MySQL Shell for VS Code


MySQL Shell for VS Code  /  ...  /  Configure a Connection Using MySQL Database Service (MDS)

Pre-General Availability: 2023-05-24

4.2.5 Configure a Connection Using MySQL Database Service (MDS)

Prerequisites

  • Access to a tenancy, a compartment, a DB system (OCID), and a Bastion.

  • Generated oci_api_key.pem and oci_api_key_plublic.pem files.

  • A configuration file with required entries (user, fingerprint, tenancy, region, and key_file). For example:

    [DEFAULT]
    user=ocid1.user.oc1..aaaaaaaab ...
    fingerprint=48:57:a4 ...
    tenancy=ocid1.tenancy.oc1..aaaaaaaaas ...
    region=us-ashburn-1
    key_file=~.oci/oci_api_key.pem

    Add the configuration and PEM files to the .oci directory of the account holder.

To configure this type of connection, you need to specify information in multiple tabs.

Basic Tab

  • Host Name or IP Address

    Use the host name localhost.

  • 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. Use the Clear Password to remove a stored password.

  • Connect to OCI DB server using MDS settings

    When you enable this option, the MDS tab appears.

MDS Tab

  • Profile Name

    Select a profile from the list. The list consists of the different profiles that you defined previously in your configuration file.

  • SSH Private Key File

    Your existing SSH private key, which is discovered automatically. The name is shown as id_rsa when found.

  • SSH Public Key File

    Your existing SSH public key, which is discovered automatically. The name is shown as id_rsa.pub when found.

  • MySQL DB System OCID

    Add the OCID of an existing DB System to use for the connection. To copy an OCID from the console:

    1. From the navigation menu, and select Databases.

    2. Under MySQL, click DB Systems to open a list of DB Systems in the compartment and select an entry to use for the connection.

    3. From the DB System Information tab, locate the OCID entry under General Information, and click Copy.

  • Bastion OCID

    Select the OCID of an existing Bastion to use for the connection or create a new Bastion in the compartment.

  • MySQL DB System Name

    The connection discovers the DB System name automatically.

  • Bastion Name

    The connection discovers Bastion name automatically.