Manage OceanBase Database instances by using Bytebase

2025-07-16 11:33:08  Updated

Bytebase is an open-source database change management and collaboration tool. It provides both SaaS services and a self-hosted version. In this topic, a MySQL tenant of OceanBase Database is used as an example to demonstrate how to manage OceanBase instances by using Bytebase.

Prerequisites

  1. You have deployed Bytebase. For more information, see GitHub.

  2. You have obtained the connection information of the OceanBase cluster, including the instance name, IP address, port number, and username and password of the account for connection. If you need to create a user, grant privileges to the user based on the privilege requirements of Bytebase and your actual business needs. For more information, see Create a user.

Procedure

  1. Log in to the Bytebase platform, and create a workspace and enter the workspace as prompted.

  2. Click Add Instance and select OceanBase (MySQL) in the dialog box that appears.

    The parameters that need to be specified are described by using the following connection string as an example:

    obclient -h10.10.10.1 -uusername@obtenant#obdemo -P2883 -p****** -c -A oceanbase
    
    Parameter Description
    Instance Name The name of your instance, for example, obdemo.
    Environment Select Test or Prod based on your needs.
    Host or Socket Enter the address obtained from the -h parameter in the connection string, for example, 10.10.10.1.
    Port Enter the port number obtained from the -P parameter in the connection string, for example, 2883.
    Username Enter the username obtained from the -u parameter in the connection string, for example, username@obtenant.
    Password Enter the password obtained from the -p parameter in the connection string, for example, ******.
  3. Click Test Connection. After the connection is successful, click Create.

  4. After the instance is added, you can integrate Bytebase with GitOps.

    • If you need to enable the GitOps workflow, you can integrate your code repository service, such as GitHub, GitLab, or Bitbucket Cloud, in Bytebase.
    • Configure Git repositories to store database change scripts and submit changes to the corresponding branches. Bytebase will automatically pull changes and execute the approval and release process.
  5. Manage database changes.

    • Create SQL migration scripts and submit change requests through Bytebase.
    • Participate in the review process and collaborate with other team members to review SQL changes.
    • Execute the approved changes. Bytebase will automatically apply them to the target database within the preset time window.

Contact Us