This topic describes how to create an account under a tenant.
Background information
Before using the database, you must create an account with database access permissions in the tenant. Different account types have different permissions. Only an account with database operation permissions can log in to the database for operations. When creating a new account in a tenant in MySQL mode, you can associate the account with multiple databases. When creating a new account in an tenant in Oracle mode, the account only has permissions for its corresponding schema.
Prerequisites
- The tenant is not being created or deleted and has not been deleted.
Create an account
You can create an account through the following four methods:
Method 1: Log in to the OceanBase Cloud console. On the tenant dashboard page, click Manage Access in the left-side navigation pane, then click Create Account in the upper-right corner.
Method 2: Log in to the OceanBase Cloud console. On the Tenants page, click Actions in the Actions column of the target tenant, and then select Create Account.
Method 3: Log in to the OceanBase Cloud console. Click Create Account in the upper-right corner of the tenant dashboard.
Method 4: Log in to the OceanBase Cloud console. On the instance list page, expand the target instance, and click ··· under the tenant name, then select Create Account.
The following steps use Method 1 as an example:
Log in to the OceanBase Cloud console.
On the instance list page, click the expand icon to the left of the instance name, then click the target tenant name.
Click Manage Access in the left-side navigation pane to go to the account interface.
Click Create Account in the upper-right corner. On the Create Account page, configure the following settings.
ParameterDescriptionAccount Name Set the account name. The account name must start with a lowercase English letter, be 2 to 32 characters long, and contain only English letters, hyphens, underscores, and digits. Reserved keywords (including their lowercase forms) such as SYS, OCEANBASE, ROOT, OPERATOR, LBACSYS, ORAAUDITOR, OBMIGRATE, OMC, IDB_DDL, ODC_RND, ODC_DDL, DWEXPcannot be used.Host Address You can enter % (any host), IP address (such as 192.168.1.1), subnet mask (such as 192.168.1.%), and domain name. Account Type You can choose between a regular account, super account, or read-only account. - A regular account can perform authorized operations on the authorized database.
- A read-only account has read permission on all databases by default.
Note
Data manipulation language (DML) statements are used to query or manipulate data in existing schema objects. Data definition language (DDL) statements are used to define, modify, and delete schema objects. For more information, see SQL statements.
Global Privileges Select the global permissions for the account. A regular account only supports performing corresponding permission operations on the authorized database. A read-only account supports setting encryption and decryption permissions. Accessible Databases You can authorize operations on specific databases for a regular account. Selecting databases from the authorized list allows for batch authorization. For detailed permission descriptions, see Account permission list. Password The current password policy varies based on the database version support. - MySQL-compatible mode:
- For databases earlier than V4.2.1: The password must be 10 to 32 characters long and contain three of the following types: uppercase English letters, lowercase English letters, digits, and special characters.
- For databases V4.2.1 and later: The password length is 8 to 64 characters, supporting custom password policies. For instructions, see Set a password policy.
- Oracle-compatible mode: The password must be 10 to 32 characters long and contain three of the following types: uppercase English letters, lowercase English letters, digits, and special characters.
~!@#$%^&*_-+=|(){}[]:;,.?/.Random Password Click this option to have the system automatically generate a password for you. Copy and keep it securely. Remarks (Optional) The length of the remarks cannot exceed 30 characters. Click Create. After the account is created, you can view its information in the account list.