ScriptsApr 15, 2026·3 min read

Bytebase — Database DevOps and CI/CD for Teams

A web-based database CI/CD platform for DBAs and engineers. Schema review, change approval, GitOps migration pipelines and data access control across MySQL, Postgres, Snowflake, Oracle, TiDB, ClickHouse and more.

TL;DR
Bytebase adds schema review, SQL linting, and change pipelines to 20+ database engines.
§01

What it is

Bytebase is an open-source database DevOps platform that sits between developers and their databases. It adds schema review, SQL linting, change-management workflows, GitOps pipelines, and fine-grained data access control to database engines that traditionally lack them.

Bytebase is built for engineering teams that want to treat database changes like code changes: reviewed, approved, and audited. It centralizes connections to 20+ engines including MySQL, Postgres, Oracle, SQL Server, Snowflake, TiDB, ClickHouse, MongoDB, and Redis.

§02

How it saves time or tokens

Bytebase eliminates the manual back-and-forth of database change management. Instead of reviewing SQL in pull requests, pasting it into a terminal, and hoping nothing breaks, Bytebase runs 100+ built-in lint rules against your SQL, orchestrates change pipelines across dev, test, staging, and production with approval gates, and provides a full audit trail. GitOps mode triggers migrations on merge, removing manual deployment steps entirely. Data masking and query-time RBAC prevent accidental data exposure without custom middleware.

§03

How to use

  1. Start Bytebase with a single Docker container:
docker run --init --name bytebase \
  --publish 8080:8080 \
  --volume ~/.bytebase/data:/var/opt/bytebase \
  bytebase/bytebase:latest \
  --data /var/opt/bytebase --port 8080
  1. Open http://localhost:8080, set up an admin account, and add your database instances.
  1. Create a project, invite teammates, and submit your first schema change for review through the web UI or via GitOps by pushing a migration file to your repository.
§04

Example

A typical Bytebase migration file stored in your Git repository:

-- Migration: Add user preferences table
-- Bytebase will lint this against 100+ rules before applying

CREATE TABLE user_preferences (
    id BIGINT PRIMARY KEY AUTO_INCREMENT,
    user_id BIGINT NOT NULL,
    preference_key VARCHAR(128) NOT NULL,
    preference_value TEXT,
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    UNIQUE KEY uk_user_pref (user_id, preference_key),
    FOREIGN KEY (user_id) REFERENCES users(id)
);

-- Bytebase checks: naming convention, index coverage,
-- foreign key presence, NOT NULL usage, column types
§05

Related on TokRepo

  • Database tools — More database management and migration tools curated on TokRepo.
  • DevOps tools — CI/CD and infrastructure automation resources.
§06

Common pitfalls

  • Running Bytebase without connecting it to your CI/CD pipeline means changes still require manual approval clicks. Set up GitOps mode early to get the full benefit.
  • Skipping the SQL lint rule configuration leads to false positives on legacy databases with non-standard naming. Customize the lint policy per project.
  • Not separating environments (dev/staging/prod) in Bytebase defeats the purpose of staged rollouts. Create distinct environment configurations even if they share the same database engine.

Frequently Asked Questions

What databases does Bytebase support?+

Bytebase connects to 20+ database engines including MySQL, PostgreSQL, Oracle, SQL Server, Snowflake, TiDB, ClickHouse, MongoDB, Redis, MariaDB, OceanBase, and Spanner. Each engine gets tailored lint rules and migration support.

How does Bytebase GitOps mode work?+

In GitOps mode, Bytebase integrates with GitHub, GitLab, or Bitbucket. When you merge a branch containing migration SQL files, Bytebase automatically picks up the changes, runs lint checks, and applies them through the configured pipeline (dev to staging to production).

Is Bytebase open source?+

Yes. Bytebase is open source with a Community Edition that covers core features. The Team and Enterprise editions add features like custom approval workflows, SSO, and advanced audit logging.

How does Bytebase handle data access control?+

Bytebase provides query-time RBAC, dynamic data masking, export controls, and audit logs. You can define which users can query which tables and columns, and sensitive data is masked in query results based on role.

Can Bytebase replace manual database reviews in pull requests?+

Yes. Bytebase runs 100+ SQL lint rules automatically, checks for naming conventions, missing indexes, dangerous operations, and schema compatibility. This replaces manual SQL review in pull requests with automated, consistent validation.

Citations (3)

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets