MySQL HeatWave on AWS  /  ...  /  Connecting with MySQL Shell

5.2.1 Connecting with MySQL Shell

This topic describes how to connect to a MySQL DB System using MySQL Shell.

Prerequisites:

  • A machine or compute instance with internet connectivity for connecting to the MySQL DB System.

  • A MySQL Shell command-line utility installed on the machine or compute instance. For installation instructions, refer to Installing MySQL Shell.

  • A MySQL user account on the MySQL DB System to connect with. You can use the MySQL Administrator user that you specified when creating the DB System or a MySQL user account created on the DB System using CREATE USER .

  • A public-facing IP address for your machine or compute instance that is permitted to connect to the DB System. Allowed Client Addresses information is available on the MySQL DB System Details page. See Viewing DB System Details.

  • The host name of the MySQL DB System as defined on the MySQL DB System Details page. See Viewing DB System Details.

To connect to a DB System:

  1. Start MySQL Shell and connect to the MySQL DB System using the following command:

    $> mysqlsh Username@HostNameOfMySQLDBSystem
                                
    Please provide the password for 'Username@HostNameOfMySQLDBSystem':

    This command starts a global session. MySQL Shell attempts to connect to port 33060 by default and, if that port is not available, falls back to port 3306.

    The connection is made and message similar to the following is displayed:

                               MySQL Shell 8.0.30
    
    Copyright (c) 2016, 2022, Oracle and/or its affiliates.
    Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
    Other names may be trademarks of their respective owners.
    
    Type '\help' or '\?' for help; '\quit' to exit.
    Creating a session to 'Username@HostNameOfMySQLDBSystem'
    Fetching schema names for autocompletion... Press ^C to stop.
    Your MySQL connection id is 38 (X protocol)
    Server version: 8.0.30-u1-cloud MySQL Enterprise - Cloud
    No default schema selected; type \use <schema> to set one.
    MySQL  HostNameOfMySQLDBSystem.dbsystem JS >