This topic provides the instructions on how to quickly deploy a transactional instance through the official website of OceanBase and use the sample code to run your first queries.
OceanBase Cloud also supports other channels to create a transactional instance, including AWS Marketplace, GCP Marketplace, Huawei Cloud Marketplace, and Alibaba Cloud Marketplace. For details on how to create a transactional instance through these channels, refer to Create a transactional instance.
Step 1: Create an OceanBase Cloud account
Navigate to the OceanBase official website, and click Get Started to redirect to the OceanBase Cloud console.

Click Sign Up.
On the Sign Up page, provide the necessary information for the registration, including your email, the verification code you receive via email, password, and your country.
Check the box of I agree to OceanBase International Privacy Policy and click Sign Up to create an account.
Step 2: Create a transactional instance
Log in to the OceanBase Cloud console with the account you just created.
Click Create Instance displayed on the page.
On the Create Instance page, select Dedicated (Transactional) under Instance Type.
Select your cloud vendor and the deployment region. OceanBase Cloud now supports to select AWS, Google Cloud, Huawei Cloud, and Alibaba Cloud as the cloud provider.
Select your instance specifications.
Configuration Description Instance Name Set the instance name. The name must be 2 to 64 characters in length and can contain only Chinese characters, digits, uppercase and lowercase letters, underscores, and hyphens. Storage Architecture - Shared Nothing: The computing resources and data storage are in the same node. Data is locally processed on the computing node.
- Shared Storage: This cloud-native architecture separates storage and computing in an instance by using multiple computing nodes and shared storage technology.
Version The OceanBase database version. Deployment Mode - Single-IDC Deployment: All nodes are located within the same zone. This deployment supports both two-node and three-node configurations within a single IDC. If you require this setup, please contact OceanBase technical support.
- Dual-IDC Deployment: Two nodes are deployed across two zones, with a third node deployed in a different zone solely for log synchronization.
- Multi-IDC Deployment: Primary and standby nodes are located in different zones, enabling disaster recovery across zones. This deployment comes at no additional cost and by default, all three zones are selected.
Zone Select the target zone. You can select the zone with the lowest network latency by using View Network Latency. - Single-IDC Deployment: Select 1 zone.
- Dual-IDC Deployment: Select 2 zones.
- Multi-IDC Deployment: Select 3 zones.
Compute Select the compute specification as needed. Storage Disk Type EPL0 and EPL1 are supported. Storage The storage specifications vary by compute specifications. Select the storage specification as needed. For more information, see Instance billing. Maximum IOPS per Node The maximum IOPS for each node is calculated based on the compute specification and storage type and specification. The actual available IOPS is subject to the result displayed on the OceanBase Cloud console. Note
At present, only instances purchased through Alibaba Cloud, Huawei Cloud, and AWS support viewing IOPS information.
Specify the number of instances you want to create in the Quantity section.
In the Summary section on the right, confirm the configurations and then click Create Instance.
After the purchase is completed, you can navigate back to the Instances page to view the creation progress.
Step 3: Create a tenant
On the Instances page, after the instance is created,click the name of the instance to go to the Overview page of the instance.
In the upper-right corner of the Overview page, click Create Tenant.
Complete the configurations for your tenant based on your needs.
Field Description Tenant Name The name of the tenant. The tenant name must start with a letter or an underscore (_), and contain 2 to 20 characters, which can be uppercase letters, lowercase letters, digits, and underscores. It cannot be set to sys.Compatibility Mode The mode of the tenant. Valid values: MySQL Compatible and Oracle Compatible. Number of Resource Units OceanBase Database manages physical resources based on resource units. A resource unit is a collection of physical resources such as CPU, memory, disk space, and IOPS. Each resource unit contains three nodes. Three nodes are added each time you add a resource unit. Unit Specification The CPU and memory capacities on a single node of the tenant. Note
- The total CPU and memory capacities of all tenants cannot exceed the specifications of the cluster to which they belong.
- Total available resources of a tenant = Resources on a single node × Number of resource distribution nodes × Number of replicas
Character Set The character set of the tenant. - The utf8mb4, utf16, gbk, gb18030, and binary character sets are supported for a MySQL-compatible tenant.
- The utf8 and gbk character sets are supported for an Oracle-compatible tenant.
Table Name Case Sensitivity Specifies whether to enable case sensitivity for table names. Note
You must enable this parameter when Compatibility Mode is set to
MySQL Compatible. By default, table names are case-insensitive.Time Zone The time zone of the tenant. Primary Zone The primary zone of the tenant. Network Settings When selected, a public endpoint will be created automatically. Remarks (Optional) Additional information about the tenant. The remarks cannot exceed 30 characters in length. Click Create. You can view the progress of tenant creation on the Instances page.
(Optional) Step 4: Create a database
If you create a tenant in the MySQL compatible mode, you will need to create a database first. For tenants in the Oracle compatible mode, you can skip this step.
On the Instances page, expand the target instance and click the name of your tenant to go to the Overview page of the tenant.
In the upper-right corner of the Overview page, click Create Database.
In the Create Database dialog, complete the following configurations, and then click Create to finish creating the database.
Field Description Database Name The database name. It cannot be set to a reserved keyword such as SYS.Character Set The character set to be used in the database, which can be UTF8MB4 or GBK. Remarks (Optional) The remarks on the database, which cannot exceed 30 characters in length.
Step 5: Create a database user
On the Instances page, expand the target instance and click the name of your tenant to go to the Overview page of the tenant.
In the upper-right corner of the Overview page, click Create Account.
In the Create Account dialog, complete the following configurations, and then click Create to finish creating the database user.
Field Description Account Name The name of the account. The account name must start with a lowercase letter and be 2 to 32 characters in length. It can contain uppercase letters, lowercase letters, hyphens (-), underscores (_), and digits, and cannot contain reserved keywords (case-insensitive), such as SYS, OCEANBASE, ROOT, OPERATOR, LBACSYS, ORAAUDITOR, OBMIGRATE, OMC, IDB_DDL, ODC_RND, ODC_DDL, and DWEXP. Account Type The type of the account, including <UI-TERM>Regular Account</UI-TERM>,<UI-TERM>Super Account</UI-TERM>, and<UI-TERM>Read-only Account</UI-TERM>.- A regular account has the privileges to execute DML and DDL statements in the database. For more information, refer to Account privileges.
- A super account has read/write privileges on all databases by default.
- A read-only account has the read privilege on all databases by default.
Grant Database Privileges This option is displayed only when you create a regular account. You can grant the following database privileges to an account: - Custom: ALTER, CREATE, DELETE, DROP, INSERT, SELECT, UPDATE, INDEX, CREATE VIEW, and SHOW VIEW. You can select multiple privileges.
- Read-only: CREATE SESSION, SELECT, and SHOW VIEW.
- Read-write: all privileges except GRANT OPTION.
- DDL: CREATE, DROP, ALTER, SHOW VIEW, and CREATE VIEW.
- DML: SELECT, INSERT, UPDATE, DELETE, SHOW VIEW, and PROCESS.
Password The password of the account. The password must be 8 to 32 characters in length and contain at least two uppercase letters, two lowercase letters, two digits, and two special characters. Supported special characters are ~!@#%^&*_-+=\|(){}[]:;,.?/".Remarks (Optional) Additional information about the account. The remarks cannot exceed 30 characters in length.
On the Instances page, expand the target instance and click the name of your tenant to go to the Overview page of the tenant.
In the upper-right corner of the Overview page, click Create Account.
In the Create Account dialog, complete the following configurations, and then click Create to finish creating the database user.
Field Description Account Name The name of the account. The account name must start with a lowercase letter and be 2 to 32 characters in length. It can contain uppercase letters, lowercase letters, hyphens (-), underscores (_), and digits, and cannot contain reserved keywords (case-insensitive), such as SYS, OCEANBASE, ROOT, OPERATOR, LBACSYS, ORAAUDITOR, OBMIGRATE, OMC, IDB_DDL, ODC_RND, ODC_DDL, and DWEXP. Account Type The type of the account, including <UI-TERM>Regular Account</UI-TERM>and<UI-TERM>Super Account</UI-TERM>.- A regular account has the privileges to execute DML and DDL statements in the database. For more information, refer to Account privileges.
- A super account has read/write privileges on all databases by default.
Password The password of the account. The password must be 8 to 32 characters in length and contain at least two uppercase letters, two lowercase letters, two digits, and two special characters. Supported special characters are ~!@#%^&*_-+=\|(){}[]:;,.?/".Remarks (Optional) Additional information about the account. The remarks cannot exceed 30 characters in length.
Step 6: Load sample data and run queries
On the Instances page, expand the target instance and click the name of your tenant to go to the Overview page of the tenant.
In the left-side navigation pane, click Load Data.
On the Load Data page, click Load Sample Data.
In the Load Sample Data dialog, complete the following configurations, and then click Import to finish importing the sample data.
Field Description Category Select Benchmarking. Sample Dataset Select TPC_H_128M. Select an Empty Database Select the database you created in Step 4. After the sample data is imported, in the left-side navigation pane, click SQL Console.
On the SQL Console page, select the database user you created in Step 5 and enter the password, then click Connect to log in to the SQL console.
In the SQL editing window, select the database you loaded sample data into, and then execute the following SQL statement, which will display the customer information in the
customertable.SELECT * FROM customer;
On the Instances page, expand the target instance and click the name of your tenant to go to the Overview page of the tenant.
In the left-side navigation pane, click Load Data.
On the Load Data page, click Load Sample Data.
In the Load Sample Data dialog, complete the following configurations, and then click Import to finish importing the sample data.
Field Description Category Select Benchmarking. Sample Dataset Select TPC_H_128M. Select a Database Account Select the database user you created in Step 5. After the sample data is imported, in the left-side navigation pane, click SQL Console.
On the SQL Console page, select the database user you created in Step 5 and enter the password, then click Connect to log in to the SQL console.
In the SQL editing window, select the database you loaded sample data into, and then execute the following SQL statement, which will display the customer information in the
customertable.SELECT * FROM customer;