mysql-to-mariadb

Guides migration of MySQL applications to MariaDB by mapping syntax, feature, and compatibility differences.

28|115|Updated Jan 28, 2025
One-click install
npx skills add https://github.com/mariadb-corporation/mariadb-docs --skill mysql-to-mariadb-mariadb-corporation
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: mysql-to-mariadb
Source: https://github.com/mariadb-corporation/mariadb-docs/tree/main/agent-skills/topical/mysql-to-mariadb
Command: npx skills add https://github.com/mariadb-corporation/mariadb-docs --skill mysql-to-mariadb-mariadb-corporation

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Developers moving from MySQL to MariaDB often assume drop-in compatibility, but MariaDB diverges significantly from MySQL 8.0 in authentication, JSON handling, GTID replication, and SQL features, causing unexpected failures and broken code. ## Core Features & Use Cases - Compatibility Reference: Maps MySQL 8.0 behaviors to MariaDB equivalents, including authentication plugins, JSON functions, collations, and replication syntax. - Migration Guidance: Explains why InnoDB data files are not portable between MySQL 8.0 and MariaDB and prescribes logical dump/restore workflows. - MariaDB-Only Features: Surfaces capabilities MySQL lacks, such as RETURNING, CREATE SEQUENCE, system-versioned tables, and UUID_v7(). - Use Case: When a MySQL application fails on MariaDB because of caching_sha2_password authentication or JSON ->> operators, use this Skill to identify the correct MariaDB syntax and version requirements. ## Quick Start Ask the AI to review your MySQL schema or query for MariaDB compatibility and suggest the required changes.

Frequently Asked Questions about mysql-to-mariadb

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate a MySQL 8.0 database to MariaDB?▼

Migrate MySQL 8.0 to MariaDB using a logical dump and restore, not by copying InnoDB data files, since the data dictionary formats are incompatible. Use MySQL's own mysqldump with named databases rather than --all-databases to avoid importing MySQL system tables.

Is MariaDB a drop-in replacement for MySQL 8.0?▼

MariaDB is not a drop-in replacement for MySQL 8.0, though it was for MySQL 5.5 and 5.6. Authentication plugins, JSON handling, GTID replication, and several SQL features differ significantly between modern MariaDB and MySQL 8.0.

Why does caching_sha2_password authentication fail on MariaDB?▼

Connections using caching_sha2_password fail on stock MariaDB because the plugin is not installed by default. Convert accounts to mysql_native_password or ed25519, or enable the full caching_sha2_password plugin available since MariaDB 12.1.

Does MariaDB support MySQL JSON operators like -> and ->>?▼

MariaDB does not support the JSON -> and ->> shorthand operators. Use JSON_EXTRACT(col, '$.key') and JSON_UNQUOTE(JSON_EXTRACT(...)) instead. JSON_TABLE() is available from MariaDB 10.6 onward.

What features does MariaDB have that MySQL does not?▼

MariaDB offers RETURNING for INSERT and DELETE, CREATE SEQUENCE objects, system-versioned temporal tables, Galera Cluster, native UUID and INET6 data types, and UUID_v7() for time-ordered UUIDs. These have no MySQL 8.0 equivalent.

Can I replicate between MySQL and MariaDB using GTID?▼

MariaDB GTID format is incompatible with MySQL GTID, so GTID-based replication between the two breaks. MariaDB also uses CHANGE MASTER TO with MASTER_* options rather than MySQL 8.0's CHANGE REPLICATION SOURCE TO syntax.