mysql_client_plus
0.2.0, released 8 days ago by dev.sumsg.com
Native MySQL client written in Dart with connection pooling, transactions, and TLS support.
What it does
Provides a pure Dart client for connecting to MySQL and MariaDB databases. It supports connection pooling, prepared statements, transactions, large result set streaming, and TLS connections.
AI-written summary of version 0.2.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to connect a Dart or Flutter application directly to a MySQL or MariaDB database.
- You require connection pooling and transaction support in a pure Dart SQL client.
Skip it when
- You need a robust ORM instead of executing raw SQL queries.
- Your architecture mandates talking to databases exclusively through a backend REST/GraphQL API rather than direct client-side database access.
Strengths
- Written in pure Dart with support for mobile, desktop, and dart runtimes.
- Supports connection pooling, prepared statements, and transactions.
- Handles SSL/TLS connections and multiple authentication plugins like caching_sha2_password.
Weaknesses
- Directly exposing database connections in client applications can be a security risk if not properly secured.
- Lacks advanced ORM features, requiring manual query writing and result mapping.
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 4
No native platform steps required, but network security rules and database access permissions must be configured.
final pool = MySQLConnectionPool(
host: '127.0.0.1',
port: 3306,
userName: 'your_user',
password: 'your_password',
maxConnections: 10,
databaseName: 'your_database_name',
);
var result = await pool.execute("SELECT * FROM book WHERE id = :id", {"id": 1});
for (final row in result.rows) {
print(row.assoc());
}Alternatives
Packages that do the same job and could replace mysql_client_plus.
- mysql_client
Native MySQL and MariaDB client written in Dart.
50Compare - mysql_dart
Native MySQL and MariaDB client written in Dart.
74Compare - mysql1
MySQL and MariaDB database driver for Dart and Flutter
83Compare - powersync
PowerSync Dart and Flutter SDK. Sync Postgres, MongoDB, MySQL or SQL Server with SQLite in your app
92Compare
Works with
Packages commonly used together with mysql_client_plus: ones it builds on, ones built on it, and its own family.
- cryptomysql_client_plus depends on itProvides SHA, MD5, and HMAC hashing functions for Dart.
- pointycastlemysql_client_plus depends on itA Dart library providing a wide range of cryptographic algorithms and primitives.
- tuplemysql_client_plus depends on itProvides immutable tuple classes for grouping values.
- buffermysql_client_plus depends on itUtilities and classes for reading and writing byte buffers and binary data streams.
- finchBuilt on mysql_client_plusA lightweight Dart framework for building server‑side web apps, APIs, databases and WebSockets.
- dartframeBuilt on mysql_client_plusA data manipulation and analysis library inspired by Pandas and NumPy for Dart and Flutter.
- mysql_utilsBuilt on mysql_client_plusA helper library that makes MySQL database operations simpler using mysql_client_plus.