mysql_dart
4.0.1, released 3 weeks ago by an unverified publisher
Native MySQL and MariaDB client written in Dart.
What it does
Connects directly to MySQL and MariaDB databases without external runtime dependencies. Supports connection pooling, transactions, TLS encryption, prepared statements, and result-set streaming.
AI-written summary of version 4.0.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need a pure Dart MySQL or MariaDB client for backend or client-side use
- You require connection pooling and real prepared statements
- You need TLS support and modern authentication plugins like caching_sha2_password
Skip it when
- You are using a different database engine such as PostgreSQL or SQLite
- Exposing database credentials directly in client applications is insecure
Strengths
- Zero external runtime dependencies
- Supports connection pooling, transactions, and result streaming with backpressure
- High performance AOT-compiled query execution
Weaknesses
- Older database servers might require TLS configuration adjustments or `secure: false` on trusted networks
- Exposing direct database ports to the internet is dangerous
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
Requires network access to a MySQL or MariaDB server and proper connection credentials.
final pool = MySQLConnectionPool(
host: '127.0.0.1',
port: 3306,
userName: 'your_user',
password: 'your_password',
maxConnections: 10,
);
var result = await pool.execute('SELECT * FROM book WHERE id = :id', {'id': 1});Alternatives
Packages that do the same job and could replace mysql_dart.
- mysql_client_plus
Native MySQL client written in Dart with connection pooling, transactions, and TLS support.
74Compare - mysql_client
Native MySQL and MariaDB client written in Dart.
50Compare - mysql1
MySQL and MariaDB database driver for Dart and Flutter
83Compare - mysql_utils
A helper library that makes MySQL database operations simpler using mysql_client_plus.
67Compare
Works with
Packages commonly used together with mysql_dart: ones it builds on, ones built on it, and its own family.
- flint_dartBuilt on mysql_dartFull‑stack Dart framework for building server, UI, and APIs in pure Dart
- eloquentBuilt on mysql_dartLaravel-style query builder, schema builder, and migrations for PostgreSQL and MySQL.
- angel3_orm_mysqlBuilt on mysql_dartMySQL and MariaDB support for Angel3 ORM, including querying and transactions.