Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Db Mysql Laravel Package

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.

Deep Wiki
Context7

Product Decisions This Supports

  • Framework standardization / platform bet. This package is the MySQL–MariaDB driver for 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.
  • Build vs. buy (buy/adopt, don't build). A MySQL wire-protocol driver with schema introspection, query builder dialect handling, and transaction semantics is undifferentiated heavy lifting. Adopt an existing BSD-3-Clause driver rather than maintain PDO boilerplate, charset/collation defaults, and JSON column introspection in-house.
  • Multi-engine roadmap. If the roadmap includes supporting MySQL 8.x and MariaDB side by side (common for self-hosted/on-prem deployments), a maintained driver that abstracts dialect differences reduces per-engine QA surface. Conversely, if you are MySQL-only forever, the abstraction earns less.
  • Migration and modernization programs. Relevant to any planned Yii2 → Yii3 upgrade: the ORM/DB layer is one of the largest mechanical migration surfaces, and this driver is a prerequisite for that workstream. Budget it as migration cost, not as new feature capacity.
  • Reusable package strategy. If your product ships Yii components/extension packages to customers or third parties, depending on yiisoft/db-mysql lets those packages stay database-portable rather than hard-coding an ORM.
  • Not a Laravel decision. Despite the framing, this is a Yii Database driver. A Laravel codebase already has 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.

When to Consider This Package

Consider it when:

  • The application or library is built on Yii3 / yiisoft/db, or you are deliberately standardizing on that DBAL across services or packages.
  • You need a thin, permissively licensed (BSD-3-Clause) MySQL/MariaDB driver with no copyleft obligations and no vendor runtime fee.
  • You want dialect handling for MySQL and MariaDB (schema introspection, quoting, AUTO_INCREMENT, JSON, engine/charset options) rather than hand-rolled SQL per engine.
  • You can accept a small community and single-vendor governance (Yii ecosystem maintainers). It is a foundational, low-churn component, which softens the risk — but it is not a 10k-star dependency with a large third-party contributor base.
  • Your team has PHP and PDO MySQL/MariaDB extensions in the runtime image and can pin versions in composer.json.

Look elsewhere when:

  • You are on Laravel or Symfony — use the framework's native DB layer. Adding this creates duplicate connection/transaction management.
  • You need connection pooling, read/write splitting at the driver level, or advanced failover. Drivers like this expose a single logical connection; pooling typically belongs to a proxy (ProxySQL) or the framework. Validate before committing.
  • You require commercial SLAs, security backports on a defined schedule, or vendor indemnification. 42 stars and a small maintainer pool mean you are effectively self-supporting for urgent CVE triage.
  • Your workload depends on MySQL-specific features beyond the driver's dialect coverage (stored-procedure-heavy logic, advanced CTE/window-function emulation, LOAD DATA, replication semantics). Confirm coverage in a short spike rather than assuming.
  • You are pre-1.0-stability sensitive: pin exact versions and review the 2025-12-05 release notes and changelog before an upgrade window.

How to Pitch It (Stakeholders)

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.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel
draftsmaninc/draftsman
square-bit/laravel-volition
himito/laravel-mailman
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk
martialbe/flysystem-oss
chondal/3312client
jeroen-g/flickr
opscale-co/nova-genbi
itsjustvita/laravel-retention
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log