Access Instance from Public Network

Last updated: 2018-09-20 18:31:23

PDF

If your CVM and cloud database are deployed in the same region, there is no need to apply for public network address. If you want to connect to the CDB MySQL database on a system in different region or on a system other than Tencent Cloud, this document describes how to enable the public network access address and offers login example.

Enabling Public Network Access Address

  1. Go to the management console, find the instance to be modified in the instance list. Click "Management" in the Operation column:
  2. In the "Public Network Address" in the instance information and click "Enable":
  3. Set the password for the public network access account, which should be a combination of 8-16 characters comprised of at least two of the following types: letters, numbers, special characters (!, @, #, $, %, ^, *, ()). The public network access account is assigned by the system by default, so it cannot be modified currently.

  4. After the password is entered, the enabling process of public network starts:

  5. When the public network is enabled successfully, its access address as well as access account ID and password will be displayed, and the relevant information will be sent via internal message:
  6. Public network access permission can be disabled with the switch. The access address will be reclaimed and allocated again when enabled next time.

Login Example

  1. Log in to the CVM, and use the following standard MySQL statement to log in to cloud database (the default account for the cloud database is "root").
    mysql -h [Public Network Address of Cloud Database] -P [Port Number of Cloud Database] -uroot -p[Cloud Database Password]
    

Note: The first "-P" in the command line is uppercase and the second "-p" is lowercase.
Example:

2.After logging in to the cloud database, you can execute the MySQL statement to manage the cloud database. For more information about MySQL statement, refer to MySQL Documentation.
Example: