MySQL HeatWave on AWS  /  ...  /  Connecting with MySQL Command-Line Client

5.2.2 Connecting with MySQL Command-Line Client

This topic describes how to connect to a MySQL DB System using a MySQL Command-Line Client.

Prerequisites:

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

  • A MySQL Command-Line Client installed on the machine or compute instance.

  • 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 client and connect to the MySQL DB System using the following command:

    $> mysql --host HostNameOfMySQLDBSystem -u Username -p

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

    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 40
    Server version: 8.0.30-u1-cloud MySQL Enterprise - Cloud
    
    Copyright (c) 2000, 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 '\h' for help. Type '\c' to clear the current input statement.
    
    mysql>