MySQL as the database for your SaaS
Run a ShipAny app on MySQL 5.7+ with Drizzle ORM — connection string, the MySQL schema template, production migrations and Hyperdrive on Cloudflare Workers.
Last updated: Oct 8, 2026
Already running MySQL? ShipAny ships a dedicated MySQL schema template, so you can use your existing MySQL 5.7+ server or a managed service without converting anything to Postgres.
What ShipAny handles
- A MySQL schema for every built-in table, with typed models via Drizzle.
- Development and production workflows:
db:pushlocally,db:generate+db:migratefor reviewable migrations. - Hyperdrive support on Cloudflare Workers: the MySQL driver also reads its connection from the
HYPERDRIVEbinding.
Setup
- Create a database and user with full privileges on it.
- Set the environment:
DATABASE_PROVIDER=mysql
DATABASE_URL=<your-mysql-connection-string> # mysql://… on port 3306
- Copy the MySQL schema template and create the tables with
pnpm db:setupandpnpm db:push(or generate and run migrations for production). - Seed roles and permissions with
pnpm rbac:init.
Tips
- Use MySQL 5.7 or later with a UTF-8 (
utf8mb4) default character set so emoji and CJK text store correctly. - Review generated migrations before production — column changes in MySQL can lock large tables.
