Create a Serverless instance

更新时间:
复制 MD 格式

This topic describes how to create a Serverless instance in the OceanBase console.

Note

Serverless instances are available only to users on the whitelist. To use this feature, contact OceanBase technical support.

Prerequisites

You have registered an Alibaba Cloud account.

For more information, see Sign up for an Alibaba Cloud account.

Create a Serverless instance

  1. Log on to the OceanBase console.

    If you are creating an instance for the first time, click Create when prompted.

  2. In the navigation pane on the left, click Instance List.

  3. In the upper-right corner of the page, click Create Database Instance.

  4. Select Serverless as the product type.

    Serverless: This billing method charges you by the second and settles your bill by the hour. You are billed for the computing and storage resources that you use. A Serverless instance can automatically scale its resources within the range you specify based on the workload.

  5. Configure the basic parameters for the instance.

    Configuration parameters

    Description

    Instance Type

    When you set Product Type to Serverless, the only available instance type is Serverless for MySQL.

    Series

    When you set Product Type to Serverless, you can only purchase the Standard Edition (Cloud Disk) series.

    Standard Edition (Cloud Disk): This is the recommended high-availability instance edition. It offers the most comprehensive range of specifications and deployment solutions for a wide variety of scenarios.

    Region

    Serverless instances can currently be deployed only in China (Hangzhou).

    Deployment Solution

    Serverless instances currently support only the dual-data-center deployment solution.

    Dual-data-center deployment: Two nodes are deployed in two separate zones, and a log node for log synchronization is deployed in a third zone. The log node does not provide read and write services. This deployment solution provides the same level of availability as a multi-data-center deployment but is more cost-effective.

    Zone

    Select the zones where you want to deploy the instance.

    Minimum Computing Power

    The minimum number of OCUs for the Serverless instance. The value can range from 1 OCU to 15 OCU.

    Maximum Computing Power

    The maximum number of OCUs for the Serverless instance. The value can range from 1 OCU to 16 OCU.

    Storage class

    Serverless instances currently support only ESSD PL1 cloud disks.

    Primary Zone

    From the zones selected for the dual-data-center deployment, choose one to be the primary zone for the Serverless instance.

    Service-linked Role

    Create a service-linked role for the Serverless instance. This role is used to access your VPC resources to complete the purchase of the OceanBase Database Serverless instance. For more information, see OceanBase service-linked role.

    VPC network

    The ID of the VPC where your business resources that need to access the database instance are located. You can have the system automatically create a VPC.

    To create a VPC, click Create >. To learn about the concept, click Documentation >.

    vSwitch

    The ID of the vSwitch where your business resources that need to access the database service are located. You can have the system automatically create a vSwitch.

    To create a vSwitch, click Create >. To learn about the concept, click Documentation >.

    Time Zone

    Select the time zone for the Serverless instance.

    Character Set

    Select the character set for the Serverless instance.

    Version

    Select the OceanBase Database version for the Serverless instance.

    Number of full-featured replicas

    The number of full-featured replicas for the Serverless instance.

    Note

    A Serverless instance uses a three-replica architecture. This includes two full-featured replicas and one log replica. The Paxos protocol is used to ensure strong consistency when data is synchronized across the three replicas.

  6. Click Buy Now.

  7. Select the Terms of Service checkbox, and then click Activate Now.

  8. After the payment is complete, the new instance is displayed in the instance list.

Configure a Serverless instance

Create a database

  1. Log on to the OceanBase console.

  2. In the navigation pane on the left, click Instance List.

  3. In the instance list, find the target Serverless instance and click its name to open the Serverless Workspace.

  4. In the navigation pane on the left, click Database Management.

  5. In the upper-right corner, click Create Database.

  6. Configure the following parameters:

  7. Click Create.

Create a database account

  1. Log on to the OceanBase console.

  2. In the navigation pane on the left, click Instance List.

  3. In the instance list, find the target Serverless instance and click its name to open the Serverless Workspace.

  4. In the navigation pane on the left, click Account Management.

  5. In the upper-right corner, click Create Account.

  6. Configure the following parameters:

  7. Click OK.

Configure a whitelist group

  1. Log on to the OceanBase console.

  2. In the navigation pane on the left, click Instance List.

  3. In the instance list, find the target Serverless instance and click its name to open the Serverless Workspace.

  4. In the navigation pane on the left, click Security Settings.

  5. In the upper-right corner, click Add Whitelist Group.

  6. Configure the following parameters:

  7. Click OK.

Enable a public endpoint

After you create a Serverless instance, a primary endpoint with a private endpoint enabled by default is automatically created. To enable a public endpoint for the primary endpoint, perform the following steps:

  1. Log on to the OceanBase console.

  2. In the navigation pane on the left, click Instance List.

  3. In the instance list, find the target Serverless instance and click its name to open the Serverless Workspace.

  4. In the Deployment Diagram area, click Enable on the primary endpoint card.

  5. In the dialog box that appears, click Confirm.

  6. After the public endpoint is enabled, you must add it to a whitelist. For more information, see Configure a whitelist group.

Log on to a Serverless instance

After you create a database, create a database account, configure a whitelist group, and enable a public endpoint, you can log on to the Serverless database. For more information, see Connect to an OceanBase database.

Note

Use the following command to connect to an OceanBase tenant using a MySQL client:

$ mysql -hxxx.xxx.xxx.xxx -P3306 -u a**** -p****** -A -c -Doceanbase