Manage databases using the SQL executor

更新时间:
复制 MD 格式

After you configure accounts in your local IDE, Cloud Toolkit scans for all Alibaba Cloud resources under those accounts. You can use the built-in SQL executor in Cloud Toolkit to quickly log on to and manage MySQL-based RDS database instances.

Background information

Alibaba Cloud Relational Database Service (RDS) is a stable, reliable, and scalable online database service. Built on the Alibaba Cloud distributed file system and high-performance SSDs, RDS supports MySQL, SQL Server, PostgreSQL, PPAS (PostgreSQL Plus Advanced Server, which is highly compatible with Oracle databases), and MariaDB engines. RDS also provides a complete solution for disaster recovery, backup, recovery, monitoring, and migration.

Cloud Toolkit currently supports managing only MySQL-based RDS databases.

Prerequisites

You can install and configure Cloud Toolkit in your local IDE.

Procedure

This topic uses the procedure in IntelliJ IDEA on Windows as an example.

  1. In the top menu bar of IntelliJ IDEA, choose Tools > Alibaba Cloud > Alibaba Cloud View > Alibaba Cloud RDS.

    The Alibaba Cloud RDS tab displays all RDS instances that are associated with your configured accounts. If no RDS instances exist for your accounts, you can click Create Instance in the upper-right corner of the Alibaba Cloud RDS tab to purchase one.

  2. On the Alibaba Cloud RDS tab, find the target RDS instance and click More > Properties in the Actions
  3. In the Properties dialog box, configure the following settings:
    1. In the Basic Information section, click Apply for Internet Address to apply for a public endpoint.

      Applying for a public endpoint is free. After you apply for a public endpoint, you can access the database over the public network, such as from your local development machine.

    2. In the Database Login Information section, configure the database information.
    3. In the Whitelist Settings section, configure the whitelist.
      Note Alibaba Cloud RDS instances provide a high level of security. By default, you cannot access an RDS instance unless a client whitelist is configured.
    4. Click Test Connection to verify the connection to the RDS instance.
  4. Click Save.

Verify the result

You can verify the result by following these steps:

  1. Return to the Alibaba Cloud View tab. Find the target RDS instance and click Login in the Actions column.

  2. In the editor, execute a command, such as show tables.

    After you execute the command, the result appears below the editor. This confirms that you can manage the database using the SQL executor in Cloud Toolkit.