This topic describes how to create a tenant in a Flagship Edition cluster instance. Flagship Edition supports tenants for different workload types in the same cluster, including tenants in MySQL, Oracle, HBase API, and Table API compatibility modes.
Prerequisites
You have created a Flagship Edition cluster instance. For more information, see Create a cluster instance.
Limitations
You can calculate the maximum number of tenants that can be created in a single cluster instance based on the following rules:
Maximum number of tenants = min(CPU count per single replica in the cluster × Number of nodes in the cluster, Maximum number of tenants allowed for the cluster), where:
- For clusters deployed with the 3F (3 full-featured nodes) deployment scheme, the default maximum number of allowed tenants is 50.
- For clusters deployed with the 2F1A (2 full-featured nodes and 1 arbitration node) deployment scheme, the default maximum number of allowed tenants is 32.
Note
- For information about cluster deployment, see Specifications.
- If you need to create more tenants, contact OceanBase Technical Support.
Procedure
Log in to the OceanBase Cloud console.
In the left-side navigation pane, click Instances.
In the instance list, find the target Flagship Edition cluster instance and click its name to enter the cluster instance workspace.
In the upper-right corner of the page, click Create Tenant.
Set the tenant configuration information as needed.
ParameterDescriptionTenant Name Set the tenant name. It must be 2 to 64 characters in length and can contain Chinese characters, digits, English letters, underscores, and hyphens. It cannot be set to sys.Compatibility Mode Flagship Edition supports the following compatibility modes: - MySQL Compatible: Highly compatible with MySQL syntax and supports the MySQL protocol. Suitable for scenarios such as online transactions and web applications.
- Oracle Compatible: Highly compatible with Oracle syntax and supports PL/SQL. Suitable for core business systems migrating from Oracle.
- HBase API Compatibility Mode: Compatible with HBase APIs and supports wide-table storage. Suitable for scenarios such as massive data storage, time-series data, and log storage.
- Table API Compatibility Mode: Provides the Table API and supports structured data storage. Suitable for scenarios such as key-value storage and metadata management.
Parameter Template When MySQL or Oracle is selected as the compatibility mode, you can choose a parameter template: - OLTP Simple Transactions: Optimized for simple transaction processing. Suitable for scenarios with short transactions, high concurrency, and a focus on point queries.
- OLTP Complex Transactions: Optimized for complex transaction processing. Suitable for scenarios with long transactions, complex SQL, and multi-table joins.
- HTAP Mixed Workloads: Balances transaction processing and analytical querying. Suitable for scenarios that require both transaction processing and real-time analysis.
- OLAP Online Analytics: Optimized for analytical querying. Suitable for scenarios involving complex queries, report analysis, and data warehousing.
Note
The HBase API Compatible Mode and Table API Compatible Mode do not support parameter template selection.
Number of Resource Units A resource unit is a unit of physical resources. OceanBase Database manages physical resources by unit. A resource unit is a collection of physical resources such as CPU, memory, storage space, and IOPS. Each resource unit contains the resources of several nodes in the cluster. Adding one more resource unit increases the resources for the corresponding number of nodes. Unit Specification Set the CPU and memory size for the tenant on a single node. Description
-
The sum of the CPU and memory sizes for all tenants cannot exceed the specifications of the cluster to which they belong.
-
Total available resources for a tenant = Resources allocated per single replica × Number of resource distribution nodes × Number of replicas
Character Set Select the character set to be used by the database. - MySQL Compatibility Mode supports character sets such as utf8mb4, gbk, gb18030, and utf16.
- Oracle Compatibility Mode supports utf8mb4, utf8, latin1, gbk, and gb18030.
- HBase API Compatibility Mode and Table API Compatibility Mode support utf8mb4.
Collation Set the collation information, such as utf8mb4_general_ci or utf8mb4_bin. Time Zone Set the time zone information. Primary Zone Set the primary zone for the tenant. Networking You can create a public endpoint at the same time for external access. Remarks (Optional) The length of the remarks cannot exceed 30 characters. Click Create. You can view the tenant creation progress on the Tenant List page.
What to do next
After the tenant is created, you can:
- Create a database account. For more information, see Create an account.
- Connect to the database. For more information, see Connect to the database.
