After you confirm the remaining resources of the OceanBase cluster, you can create a tenant in the cluster based on your business requirements.
You can use one of the following methods to create a tenant.
Create a tenant on the Tenants page.
Create a tenant on the Overview page of the specified cluster.
This topic describes how to create a tenant on the Tenant Management page of the specified cluster in OceanBase Cloud Platform (OCP).
Note
This topic takes OCP V4.0.0 as an example. The GUI varies with the OCP version.
Prerequisites
The cluster where you want to create a tenant is the running primary cluster.
Your account has the permission to manage the cluster. For example, the account is the system administrator or the OCP tenant administrator.
Procedure
Log on to the OCP console.
In the left-side navigation pane, click Tenants.
In the upper-right corner of the Tenants page, click Create Tenant.
On the Create Tenant page, configure the basic information of the tenant.
Field Description Select Cluster Select the cluster in which the tenant is to be created. Tenant Mode Specify the tenant mode. Valid values: Oracle and MySQL. Tenant Name The tenant name must contain 2 to 64 characters consisting of letters, digits, and underscores (_). Administrator Password - In MySQL mode, the administrator account is root.
- In Oracle mode, the administrator account is SYS.
- The password must be 8 to 32 characters in length and contain at least two digits, two uppercase letters, two lowercase letters, and two special characters. The supported special characters are ~ ! @ # % ^ & * _ - + = `
(){}[]:;',.?/ Character Set - In MySQL mode, the supported character sets are utf8mb4, binary, gbk, and gb18030. Default value: utf8mb4.
- In Oracle mode, the supported character sets are utf8mb4, gbk, and gb18030. Default value: utf8mb4.
Collation Note
You need to specify Collation only when you set Tenant Mode to MySQL.- If you set Character Set to binary, the valid value of the Collation parameter is binary.
- If you set Character Set to utf8mb4, valid values of the Collation parameter are utf8mb4_bin, utf8mb4_general_ci, and utf8mb4_unicode_ci. Default value: utf8mb4_general_ci.
- If you set Character Set to gbk, Collation can be set to gbk_bin or gbk_chinese_ci. Default value: gbk_chinese_ci.
- If you set Character Set to gb18030, the valid value of the Collation parameter is gb18030_bin. Default value: gb18030_chinese_ci.
Remarks (Optional) The additional information. On the Create Tenant page, configure replica settings.
If the version of the cluster is V4.0.0 or later, you can only set the same number of units for all zones. The default value is 1.
By default, the system displays configurable zones based on the zone information of the selected cluster. If you do not need to create a replica in a zone, click the Delete icon to delete the zone. The zone information fields that need to be configured and their descriptions are listed in the following table.
Field Description Replica Type The type of the replica. Valid values: - Full-featured Replica
- Read-only Replica
- Log Replica
Unit Specification OCP has a set of built-in unit specifications. You can select the specification that you need from the list of unit specifications or click Add Specification at the bottom of the list to add a custom specification. For more information, see OCP resource unit specifications. Units You need to set the number of resource units for each zone. The number of resource units cannot exceed the number of OBServer nodes in the zone. Zone Priority Rankings The priorities of the zones. This priority order affects the priority order of the primary zone of the sys tenant. The left-side list shows all zones in the cluster. You can select one or more zones from the list box on the left to add them to the list box on the right. By default, the priority of a zone selected earlier is higher than that of a zone selected later, and the zones selected at one time have the same priority. After you move the zones to the box on the right side, you can also drag them upward or downward to adjust their priority order. A zone takes priority over those beneath it. Notice
- If a primary zone is specified, the region where the primary zone is located must have at least two zones and at least two full-featured replicas, with one replica for each zone.
On the Create Tenant page, configure security settings.
Specify the list of clients that are allowed to access the tenant in the IP Address Whitelist field. The type of the replica. Valid values:
- Access from all IP addresses is supported.
- Custom: Only IP addresses on the allowlist are allowed to access this tenant. When you configure the allowlist, you must add the IP addresses of the OCP and ODP servers to the allowlist. Otherwise, you cannot manage the tenant in OCP.
Note
Configure the allowlist in the following formats:
- IP addresses, for example: 10.10.10.10,10.10.10.11
- CIDR block, for example: 10.10.10.0/24
- Fuzzy match, for example: 10.10.10.% or 10.10.10._
- Mixed format, for example: 10.10.10.10,10.10.10.11,10.10.10.%,10.10.10._,10.10.10.0/24
Optional. Go to the Parameter Settings page and modify the values of tenant parameters.
Click Submit.
What to do next
For more information about how to verify connectivity after you create the tenant, see Verify connectivity after tenant creation.