DATE:
AUTHOR:
PowerSync Product Team
MySQL

MySQL Backend Database Support Has Reached Beta!

DATE:
AUTHOR: PowerSync Product Team

Overview

We’re excited to announce that MySQL backend database support for PowerSync is officially in Beta.

PowerSync is designed to be backend database agnostic and MySQL remains one of the most widely-deployed relational databases. Reaching beta is a huge milestone because our support for MySQL is now considered production-ready for tested use cases.

Thanks to everyone who logged bugs, offered feedback and contributed PRs during the alpha and helped shape this release!

Architecture of the MySQL Implementation

PowerSync’s replication system is built on modular connectors for databases including MySQL, Postgres, and MongoDB. For MySQL, PowerSync reads changes directly from the MySQL binary log (binlog), replicates them to the PowerSync Service, where data is structured for incremental streaming to clients according to your Sync Rules.

The MySQL module performs these core functions:

  • Replicates tables from MySQL to PowerSync and keeps them in sync by listening for changes on the MySQL binary log. A modified version of the Zongji binlog listener is used to listen for changes.

  • Detects and handles schema changes on the source database and updates replicated data in PowerSync accordingly. Schema changes are detected on the binary log by parsing DDL query statements.

  • Ensures replication can resume reliably after interruptions or network issues.

Improvements since the Alpha

These are some of the main updates we shipped during the alpha:

  • Schema changes are now automatically handled, e.g. table creation, renaming, dropping, truncating, as well as adding, modifying, dropping, or renaming columns, and managing unique indexes and primary keys. If a schema change can’t be interpreted, a warning will be logged.

  • Better backpressure control when processing the binlog queue. We added a configurable memory limit so PowerSync can throttle itself during high throughput and avoid running out of memory.

  • Wildcard table replication is supported allowing you use patterns like region_* in your Sync Rules to dynamically include multiple similar tables.

  • Zongji type declarations were moved to the powersync-mysql-zongji repo for better maintainability.

  • The configured database port is now respected which addresses the issue mentioned here.

Get started with MySQL

First, configure your MySQL database for replication—configure binlog, enable GTID (if applicable), and create a replication‑enabled user as outlined in the Database Setup > MySQL docs.

Then, connect PowerSync to your database:

PowerSync Cloud: Refer to the Database Connection guide

Self‑Hosted PowerSync: Follow the Service‑Setup instructions

Feedback and Questions

Need help or have feedback? Join our Discord or open an issue on GitHub - we’re eager to know how you’re using PowerSync and what we can improve.

Powered by LaunchNotes