On Airflow 2.3.x, airflow db init and airflow db upgrade failed against MariaDB when upgrading from 2.2.5. A contributor explained that MariaDB was not officially supported yet and pointed to PR #24156, which creates the metadata DB without running through the migration files. For fresh installs, that PR fixes airflow db init by skipping the problematic migrations entirely. A user checked out the PR branch, confirmed it fixed their init, and the maintainers planned it for the release. So on MariaDB with 2.3, use a build containing PR #24156 for fresh installs.
airflow db init and db upgrade fail on MariaDB in Airflow 2.3
Airflow 2.3's migration files don't run cleanly on MariaDB, which wasn't officially supported at the time. Fix for fresh installs: use an Airflow 2.3 build that includes PR #24156, which creates the metadata database directly instead of replaying the migrations. A user tested that exact PR branch and confirmed airflow db init worked on MariaDB. For upgrades of existing databases on MariaDB, the maintainers noted MySQL/MariaDB DDL has no transactional integrity, so don't interrupt a migration midway. Source: https://github.com/apache/airflow/issues/24247