MySQL and MariaDB Adapter

Stores Payload data in MySQL or MariaDB instead of the default database

Community 0 23/wk MIT v0.1.0

Installation

pnpm add payload-db-mysql

About

This adapter lets a Payload project keep its collections, globals, and versions in a MySQL or MariaDB server. Each collection and field maps to database tables and columns, so the data stays readable with ordinary SQL tools and fits the hosting setup you already run.

You can pick serial or UUID primary keys, and the adapter handles schema push in development and explicit migrations in production. Rich text and JSON fields are stored as JSON columns, and most query operators Payload uses work on them. Geospatial operators such as near and within are not supported, and the database needs a case-insensitive utf8mb4 collation for text search to behave as expected.

Package info

Package name
payload-db-mysql
Latest version
0.1.0
Unpacked size
1.6 MB
License
MIT
Weekly downloads
23
Last publish
Oct 2, 2026

Similar adapters

More in Database

Database adapter that runs Payload on SurrealDB through its PostgreSQL-compatible SQL interface

Stores Payload data in a Postgres database, with migrations and read replica support

Vercel Postgres database adapter that stores Payload collections and globals in Postgres

Stores Payload data in Cloudflare D1 SQLite databases from Workers

Stores Payload collections and globals in a MongoDB database

Official SQLite database adapter that stores Payload collections and globals in SQLite