A native Erlang/OTP driver for MySQL and MariaDB with Mnesia-style transactions and OTP supervision.
MySQL/OTP is a native Erlang driver for connecting to MySQL and MariaDB databases. It implements the MySQL protocol directly in Erlang, providing features like Mnesia-style transactions, OTP supervision compatibility, and support for modern authentication methods. It solves the problem of reliable, Erlang-native database connectivity for distributed systems.
Erlang/OTP developers building applications that require MySQL or MariaDB database connectivity, particularly those needing OTP supervision patterns and transaction management.
Developers choose MySQL/OTP for its deep Erlang/OTP integration, native protocol implementation, and features like automatic deadlock retry and query interruption that align with Erlang's fault-tolerant design principles.
MySQL/OTP – MySQL and MariaDB client for Erlang/OTP
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Supports nested transactions via SQL savepoints and automatically retries on deadlocks, aligning with Erlang's fault-tolerant design, as detailed in the README's synopsis.
Each connection is a gen_server, making it compatible with Poolboy for pooling and OTP supervisors, enabling robust error handling in distributed systems.
Implements caching_sha2_password (MySQL 8.0.4+) and mysql_native_password, ensuring secure connections with current database versions.
Uses cached unnamed prepared statements for parametrized queries and allows interruption of slow queries without killing connections, improving performance and reliability.
Only supports MySQL and MariaDB, lacking drivers for other databases like PostgreSQL, which limits its use in polyglot database environments.
Local testing requires manual steps such as SSL certificate generation and database service configuration, as shown in the README's test instructions, adding overhead.
Uses GNU LGPL v3, which may impose distribution restrictions on proprietary software compared to more permissive licenses like MIT or Apache.
Requires direct SQL query construction and result parsing, which can be verbose and less intuitive for developers accustomed to ORM or higher-level abstractions.