Updated on 2026-11-03 GMT+08:00

Overview of Multi-Tenant Management

Function Description

Multi-tenant management in TaurusDB allows a database to serve multiple tenants, maximizing resource utilization. Data is isolated among tenants. Different tenants can only access their own data. There are tenant-level resource isolation and user-level resource isolation to avoid resource waste and improve performance. Resources can be dynamically adjusted to process workload peaks and troughs of different tenants or users in a timely manner.

The following figure shows the principle of multi-tenant management.

Figure 1 Principle diagram

The figure shows the overall process of multi-tenant management. There are system tenants and regular tenants.

There is a database (DB_1) and a user (User_1) under the system tenant, two databases (DB_1 and DB_2) and two users (User_1 and User_2) under regular tenant Tenant_1, and two databases (DB_1 and DB_2) and two users (User_1 and User_2) under regular tenant Tenant_2.

The system tenant has access to the entire DB instance. That is, the system tenant can access and manage its own database and user, and can also access and manage the databases and users under Tenant_1 or Tenant_2. Data is isolated between different regular tenants. Tenant_1 can only access and manage its own databases (DB_1 and DB_2) and users (user_1 and user_2). It cannot access the databases and users under Tenant_2 or the database and user under the system tenant.

In addition to data isolation, multi-tenancy also ensures vCPU isolation. The figure shows the total vCPUs of the current instance. You can adjust resource settings for the system tenant and regular tenants, and then allocate these resources to specific users under a tenant.

Basic Concepts

Constraints

Table 1 Constraints on multi-tenant management

Category

Constraints

Database visibility

If the kernel version of your TaurusDB instance is 2.0.78.260602 or later, the database visibility for regular tenants will change as follows:
  • Expanded database visibility: After logging in, regular tenants can view databases created by other tenants. This change affects only UI display and does not compromise data isolation between tenants. Data remains strictly isolated.
  • Updated database name display: After logging in, regular tenants will see database names appended with a tenant identifier suffix. This change affects only UI display and does not affect normal access or usage of the databases.

Multi-tenant view

If the kernel version of your TaurusDB instance is 2.0.60.241200 or later, the new multi-tenant views (including MT_RESOURCE_CONFIG, MT_TENANT, MT_TENANT_DB, MT_RESOURCE_PLAN, MT_CONSUMER_GROUP, MT_GROUP_MAPPING_RULE, and MT_PLAN_DIRECTIVE) will replace the old DBA_RSRC_* views.

Binlog

Binlogs do not support tenant isolation. If regular tenants pull binlogs, this compromises data isolation between tenants. Therefore, users of regular tenants are not allowed to pull binlogs.

Database proxy

HTAP (Standard Edition) does not support databases whose names contain at signs (@). When a database of a regular tenant is migrated to such an HTAP instance, the destination database name will be changed. After Auto Assign Requests to Column Store or Row Store Nodes is enabled, the proxy instance requires that the source and destination database names be the same, so this function must be disabled for migrating databases of regular tenants.

Backup and restoration

If the source instance has multi-tenancy enabled and its kernel version is earlier than 2.0.60.241200, and if the destination instance's kernel version is 2.0.60.241200 or later, data of the source instance cannot be restored to the destination instance using backups. In such a case, the __taurus_sys__ database may be cleared, and multi-tenancy cannot function properly.

If multi-tenancy is disabled for the destination instance, you cannot create users, databases, or tablespaces with at signs (@) in their names for that instance.

Upgrade and downgrade

  • If multi-tenancy is enabled in an instance and the instance's kernel version is 2.0.60.241200 or later, there may be scenarios where the instance needs to be downgraded to a version earlier than 2.0.60.241200.
    • After a successful downgrade, you must reboot the instance to restore multi-tenancy functionality. Otherwise, the multi-tenancy switch after the downgrade will be disabled.
    • After a successful downgrade, executing statements such as show tables under information_schema may still display newly added multi-tenancy views (including MT_RESOURCE_CONFIG, MT_TENANT, MT_TENANT_DB, MT_RESOURCE_PLAN, MT_CONSUMER_GROUP, MT_GROUP_MAPPING_RULE, and MT_PLAN_DIRECTIVE), but they cannot be accessed. To clear the residual metadata of these multi-tenancy views, you must reboot the instance.
  • If the kernel version of a TaurusDB instance is upgraded to 2.0.60.241200 or later, executing the show tables command under information_schema may fail to display newly added multi-tenancy views normally. However, these multi-tenant views remain accessible. To display them, reboot the instance.

Compatibility

  • If the multi-tenancy switch is enabled and then disabled for an instance, the names of databases, users, and tablespaces cannot contain at signs (@).
  • For a regular tenant, the maximum length of a database name is reduced from 64 characters to 50 characters, and the maximum length of a username is reduced from 32 characters to 20 characters.
  • The system databases mysql and sys are not available to regular tenants.
  • For regular tenants, fuzzy search must be used when they query tables in the performance_schema system database using a username or database name as a filter condition.
  • User root under a system tenant can kill sessions of other users. Users under a regular tenant can only kill their own sessions.
  • Instances with multi-tenancy enabled do not support full-text indexes.