Before deploying the various components of OceanBase, you must understand the user creation mechanisms for each component. Users are divided into two levels: operating system-level users (the Linux system user that runs the process) and application system-level users (internal users of OceanBase Database and its platforms).
Operating system-level users
Operating system-level users are used to run component processes on the Linux system and manage file permissions.
Component |
Process Owner |
Creation method |
Description |
|---|---|---|---|
| OBServer | admin |
Manual | Runs the observer process and requires read and write permissions on the data directory /home/admin/oceanbase. |
| OBD | root or a user with sudo privileges |
Manual | To execute the OBD deployment command, you must have SSH access permissions and root privileges on the target server. |
| OCP | admin or ocp |
Automatically created during installation or manually created as per the installation documentation | Runs the OCP service process. |
| OMS | User in the Docker container or specified system user | Automatic | Runs the OMS container or service. |
| OAT | root or a user with installation permissions |
Automatically created by the installation script | Runs the OAT service. |
| OBAgent | root or the specified monitoring user |
Manual | Runs the OBAgent monitoring agent and requires access to the OceanBase data files. |
| OBProxy | admin or obproxy |
Automatically created during installation | Runs the OBProxy process. |
| OCS | ocs or the specified system user |
Depends on the deployment method | Runs the OCS API service. |
| Log service | System service account | Automatic | Runs the log collection service. |
Notice
The OceanBase `observer` process typically runs as the `admin` user. Switching the running user may cause directory permission issues. Ensure the running user has appropriate permissions for the data directory.
Application system-level users
Application system-level users are created internally within OceanBase Database and its platforms. They are used to access and manage database or platform features.
OceanBase Database (OBServer)
System tenant user (automatically created):
User |
Description |
|---|---|
root@sys |
Super administrator of the sys tenant, automatically created upon initial startup |
standbyro |
Physical standby database read-only user |
SYS, LBACSYS, ORAAUDITOR |
System users specific to Oracle-compatible mode |
Business tenant user (automatically created):
User |
Description |
|---|---|
root@<tenant name> |
Tenant administrator in MySQL-compatible mode, automatically created when the tenant is created. |
SYS@<tenant name> |
Tenant administrator in Oracle-compatible mode, automatically created when the tenant is created. |
Application users that need to be manually created:
User |
Description |
|---|---|
monitor@sys |
The OBAgent monitoring user. It must be manually created and needs to be granted the SELECT privilege. |
| Business application connection user | Created as needed for application connections, data migration, reporting, and other purposes. |
OCP (OceanBase Control Platform)
System user (automatically created):
User |
Description |
|---|---|
admin |
Default administrator of the OCP platform, automatically created during installation. |
| Internal service account | Used to connect to the MetaDB and is automatically configured. |
Application users (manually created):
- O&M operators
- Read-only view users
- Users with specific feature permissions
OMS (OceanBase Migration Service)
System users (automatically created):
User |
Description |
|---|---|
admin |
The default administrator of the OMS platform, automatically created during installation. |
Application users that require manual creation:
User |
Description |
|---|---|
| Data migration task executor user | Created as needed for specific migration tasks. |
__oceanbase_inner_drc_user |
A dedicated user for incremental data synchronization in OMS, which must be manually created in the source OB. |
OAT (OceanBase Admin Toolkit)
System users (automatically created):
- The default administrator user, automatically created during installation.
As a containerized deployment tool, OAT has no concept of application users and does not require additional manual user creation.
Note
OAT automatically creates the `admin` user, which cannot be changed. This is different from the OBServer logic, where the `admin` system user must be manually created. Note the difference during deployment.
OCS (OceanBase Cluster Service)
- Default authentication user for APIs (system-level)
- Authentication user for API callers (configured based on the deployment mode)
Summary of user creation timing
User Type |
When to create |
Creation method |
Typical examples |
|---|---|---|---|
| OS user | During component installation | Automatic or manual | admin, ocp, obproxy |
| Database system user | When OceanBase Database is initially started | Automatic | root@sys, proxyro@sys |
| Database application user | Before business deployment | Manual | monitor, business connection user |
| Platform system user | During platform installation | Automatic | OCP's admin, OMS's admin |
| Platform application user | Before platform use | Manual | OCP operator, OMS task user |
Summary table of users for each component
Component |
OS-level User |
Application System User |
|---|---|---|
| OBServer | admin (runs the observer process) |
Automatic: root@sys, proxyro@sys; Manual: monitor, business users |
| OBProxy | admin or obproxy (running process) |
No independent users, use OceanBase users |
| OCP | admin or ocp (running service) |
Automatic: admin platform administrator; Manual: O&M user |
| OMS | Docker container user or system user | Automatic: admin platform administrator; Manual: migration task user, DRC user |
| OAT | root (installation/running) |
Automatic: default administrator; no manual creation required. |
| OBAgent | root or the monitoring user (running) |
Manual: monitor (must be manually created) |
| OCS | ocs or the system user (running) |
Default API user and caller authentication user |
| Log service | System service account | None |
| OBD Web | Web service process user | Automatic: default administrator |
User preparation process before deployment
Phase 1: Operating system-level preparation
- Create necessary system users (such as
admin,ocp,obproxy, etc.) - Configure user permissions and directory permissions.
- Ensure the running user has appropriate permissions for the installation directory and data directory.
Phase 2: OceanBase deployment
- Run OBD deployment with an appropriate system user.
- OceanBase automatically creates system users such as
root@sysandproxyro@sys. - Immediately change the password of the default system user after deployment is complete.
Phase 3: Component deployment
- Install each component as the appropriate system user.
- The components automatically create their internal system users (for example,
adminfor OCP andadminfor OMS).
Phase 4: Create application users (must be done manually)
- Create the OBAgent monitoring user
monitorin the sys tenant and grant it theSELECTprivilege. - To enable incremental synchronization with OMS, create the
__oceanbase_inner_drc_useruser in the source OB. - Create business application connection users as needed.
Phase 5: Configure permissions
- Configure appropriate permissions for system and application users.
- Test whether the functionality of each user is normal.
Considerations
OBAgent monitoring user: The
monitoruser is the only database user that must be manually created. Ensure this is completed before deployment; otherwise, OBAgent cannot collect database metrics and the monitoring feature will be unavailable.OMS DRC user: In incremental data synchronization scenarios, you must manually create the
__oceanbase_inner_drc_useruser in the source OB.Logical differences between OAT and OBServer users: OAT automatically creates the
adminuser and this cannot be changed; theadminsystem user for OBServer must be manually created. These two mechanisms are different, so be careful to distinguish them during deployment to avoid confusion.Default password security:
- Immediately change the
root@syspassword after installation. - Change the default
adminpasswords for platforms such as OCP and OMS. - Use a random password for
proxyroin V4.0+ for higher security.
- Immediately change the
Principle of least privilege:
- Separate system management users from application users.
- Use different database users for different businesses.
- Assign permissions following the principle of least privilege.
- Regularly audit user permissions.
Version differences: User creation mechanisms may vary slightly across different OceanBase versions. It is recommended to refer to the official documentation for the corresponding version.
