Log in to a database

Updated at:

This topic shows you how to log in to a MyBase instance.

Prerequisites

Obtain the connection information for your database. For more information, see View database endpoint.

Procedure

MyBase on ACK

  1. Open the Data Management (DMS) console.

  2. In the left navigation pane, expand Database Instance, and then click +.

  3. In the Add Instance dialog box, select third-party cloud/self-hosted > MySQL, and then click Next.

  4. In the Basic Information section, configure the following parameters.

    Parameter

    Description

    Network type

    Select public network.

    Instance region

    Select the region where your MyBase instance is located.

    Endpoint

    Enter the public endpoint of the MyBase instance. For more information, see View database endpoint.

    Port

    The default value is 3306.

    Database account

    Enter the privileged account that was created with your MyBase instance.

    Note

    This is not the root account, which by default does not support remote login.

    Database password

    Enter the password for the database account.

  5. Click Test Connection. After the test is successful, click Submit.

MyBase on ECS

  1. Connect to the ECS instance that hosts the data node.

  2. Change to the MySQL installation directory.

    cd /usr/local/mysql8.0/mysql/8.0.36/bin/
  3. Run the MySQL login command.

    ./mysql -h 127.0.0.1 -u root -p
  4. Enter your password and press Enter. The mysql> prompt indicates a successful login.