- DATE:
- AUTHOR:
- PowerSync Product Team
Announcing Support for MySQL as a Source Database [alpha]
We are excited to announce that PowerSync now supports MySQL backend databases. Our MySQL backend module is currently in an alpha release and open for anyone to try.
Our vision at PowerSync is to provide developers with a platform-agnostic sync engine for building local-first apps. We already support a range of client-side frameworks (with more on the roadmap), and recently released support for MongoDB as a source database, in addition to existing Postgres support. Adding MySQL is a key part of expanding this vision.
We use MySQL's binary log to replicate updates to clients in real time. We use the 3rd party library Zongji for getting updates from the binary log. We created a fork to add support for listening to the binlog GTID event and upgraded some project deps while we were at it.
How to use it
MySQL support is available to test in a hosted or self-hosted environment:
Hosted by us
Sign up for an account on powersync.com if you haven’t already. When creating a new PowerSync instance, you’ll be prompted to select a database type - select MySQL:
After selecting MySQL, enter your database details:
Hit “Test connection” and if you have any issues connecting, reach out to our support engineers on our Discord server.
PowerSync deploys and configures an isolated cloud environment for you - this take a few minutes to complete.
Self-hosted using Docker Compose
An end-to-end demo is available here. Please refer to its README for further instructions.
Current Limitations
Automatically handling schema changes is not currently supported
Cannot connect more than 1 PowerSync instance to the same MySQL DB
Truncate table events aren't detected and need to be processed manually
All of the above will be addressed in future releases.