yiisoft/db-mysql
MySQL and MariaDB driver for Yii Database. Adds MySQL-specific connection, schema, query builder, and DDL support to yiisoft/db, letting Yii applications work with MySQL databases through a consistent database abstraction layer.
yiisoft/db, the database abstraction layer used by Yii3 applications and reusable Yii packages. Adopting it is not an isolated decision — it is a downstream consequence of deciding whether yiisoft/db is your data-access layer. Treat it as a signal of stack commitment, not a standalone dependency.JSON column introspection in-house.yiisoft/db-mysql lets those packages stay database-portable rather than hard-coding an ORM.Illuminate\Database with a mature MySQL connector; adopting this package would mean running two DB abstraction layers. The PM-relevant conclusion for a Laravel team is usually "no action," and the value of the assessment is the explicit no.Consider it when:
yiisoft/db, or you are deliberately standardizing on that DBAL across services or packages.AUTO_INCREMENT, JSON, engine/charset options) rather than hand-rolled SQL per engine.composer.json.Look elsewhere when:
CTE/window-function emulation, LOAD DATA, replication semantics). Confirm coverage in a short spike rather than assuming.For executives: This is a small, free, permissively licensed software component that lets our PHP application talk to MySQL and MariaDB databases. It is not a product feature and not a revenue driver — it is plumbing. The decision it supports is stack-level: it only matters if we commit to the Yii database layer. If our products run on Laravel, the answer is no, and we should not spend engineering time here. If we run Yii, this is a required, low-cost, low-risk dependency with an active release cadence and no licensing fees, but also no commercial support — we own the risk.
For engineering: yiisoft/db-mysql is the MySQL/MariaDB driver for yiisoft/db. BSD-3-Clause, latest release 2025-12-05, ~42 GitHub stars. It provides connection, command, query-builder dialect, and schema handling over PDO. Adopt it as a pinned Composer dependency only where we already depend on yiisoft/db; do not introduce it into Laravel or Symfony services. Before adopting, run a one-day spike covering: MySQL 8.0 and MariaDB 10.x in CI, charset/collation and JSON column round-trips, transaction and savepoint behavior under our error handling, and PHP version support against our runtime matrix. Also confirm the upgrade policy — low star count means we should track the changelog ourselves and be prepared to patch or fork, which BSD-3-Clause permits. Cost estimate: near-zero integration effort if already on Yii; the real cost is ongoing dependency stewardship.
How can I help you explore Laravel packages today?