NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist
Packagist, #3983 most downloaded on Packagist
Asynchronous MySQL client for PHP based on Amp.
Latest stable
v3.1.2
Last release 21 days ago
01 Nov 2026
Release timing varies
gaps range from 3 weeks to 1.7 years
Some releases are documented
notes for 16 of 28 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
38 releases · first in 2015
Drag across the ruler to compare, or tap a release to open it.
Security: fix TLS-configured client silently falls back to plain TCP and then sends the password in cleartext on mysql_clear_password
Full Changelog: https://github.com/amphp/mysql/compare/v3.1.1...v3.1.2
Full Changelog: v3.1.1...v3.1.2
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Silence PHP 8.5 chr() deprecation in encodeInt8 by @webpatser in #145
amphp/file@4.xFull Changelog: v3.1.0...v3.1.1
amphp/file@4.xFull Changelog: https://github.com/amphp/mysql/compare/v3.1.0...v3.1.1
Added a parameter for the default transaction isolation to MysqlConnectionPool to set the default transaction level when constructing the pool
MysqlConnectionPool to set the default transaction level when constructing the poolNULL for JSON typed columns (#136)MEDIUMINT columns using the binary protocol (#140)Full Changelog: v3.0.1...v3.1.0
Fixed PHP 8.5 deprecations. Full Changelog : v3.0.0...v3.0.1
Full Changelog: v3.0.0...v3.0.1
Full Changelog: https://github.com/amphp/mysql/compare/v3.0.0...v3.0.1
Stable release compatible with AMPHP v3 and fibers! 🎉
Stable release compatible with AMPHP v3 and fibers! 🎉
As with other libraries compatible with AMPHP v3, most cases of parameters or returns of Promise<ResolutionType> have been replaced with ResolutionType.
Mysql to avoid collisions with similar names from other libraries.MysqlTransaction now extends MysqlLink instead of MysqlExecutor to support nested transactions.MysqlDataType is now an enum of MySQL data type codes and methods to decode data based on type.MysqlResult::getColumnDefinitions() which returns an array of MysqlColumnDefinition objects corresponding to the result set rows.MysqlStatement::bind() now requires a string. Binding only makes sense with long strings anyway.MysqlConnection is now an interface extending SqlConnection, with SocketMysqlConnection being the implementation.MysqlConnector since the interface was replaced by template types on SqlConnector, i.e. SqlConnector<MysqlConfig, MysqlConnection>Full Changelog: v3.0.0-beta.8...v3.0.0-beta.9
amphp/sql-common@v2.0.0-beta.9.Full Changelog: v3.0.0-beta.7...v3.0.0-beta.8
Nested transactions have been refactored to be created simply with MysqlTransaction::beginTransaction() instead of needing to wrap a MysqlTransaction into a MysqlNestableTransaction. If you did not use savepoints or nested transactions, you likely will be able to upgrade to this version without any code changes.
amphp/sql@v2.0.0-beta.6 and amphp/sql-common@v2.0.0-beta.7. Removed MysqlNestableTransaction.MysqlConnection interface now extends the base interface Connection from amphp/sql.MysqlEncodedValue, replacing MysqlDataType::encodeValue().SocketMysqlConnection::initialize() to connect(). The first parameter now accepts an instance of SocketConnector instead of a Socket.MysqlColumnDefinition now defines a set of getter methods instead of using public properties.Full Changelog: v3.0.0-beta.6...v3.0.0-beta.7
MysqlNestableTransaction which may be optionally used to create a MysqlLink from a MysqlTransaction object. Nested transactions are implemented using savepoints.Fixed support for binding to JSON columns
Full Changelog: https://github.com/amphp/mysql/compare/v3.0.0-beta.8...v3.0.0-beta.9
Compatibility with amphp/sql-common@v2.0.0-beta.9.
amphp/sql-common@v2.0.0-beta.9.Full Changelog: https://github.com/amphp/mysql/compare/v3.0.0-beta.7...v3.0.0-beta.8
Nested transactions have been refactored to be created simply with MysqlTransaction::beginTransaction() instead of needing to wrap a MysqlTransaction
Nested transactions have been refactored to be created simply with MysqlTransaction::beginTransaction() instead of needing to wrap a MysqlTransaction into a MysqlNestableTransaction. If you did not use savepoints or nested transactions, you likely will be able to upgrade to this version without any code changes.
amphp/sql@v2.0.0-beta.6 and amphp/sql-common@v2.0.0-beta.7. Removed MysqlNestableTransaction.MysqlConnection interface now extends the base interface Connection from amphp/sql.MysqlEncodedValue, replacing MysqlDataType::encodeValue().SocketMysqlConnection::initialize() to connect(). The first parameter now accepts an instance of SocketConnector instead of a Socket.MysqlColumnDefinition now defines a set of getter methods instead of using public properties.Full Changelog: https://github.com/amphp/mysql/compare/v3.0.0-beta.6...v3.0.0-beta.7
Added MysqlNestableTransaction which may be optionally used to create a MysqlLink from a MysqlTransaction object. Nested transactions are implemented
MysqlNestableTransaction which may be optionally used to create a MysqlLink from a MysqlTransaction object. Nested transactions are implemented using savepoints.Compatibility with v2.0 of amphp/socket
amphp/socketCompatibility with Result::fetchRow() added in `amphp/sql@2.0.0-beta.3`
Result::fetchRow() added in amphp/sql@2.0.0-beta.3BackedEnum instances in statement parametersMysqlResult::getParameterDefintions() which returns a list of MysqlColumnDefinition objects with metadata about each result set column.ErrorMysqlStatement::bind() now requires a string. Binding only makes sense with long strings anyway.substr().MysqlConnector since the interface was replaced by template types on SqlConnector, i.e. SqlConnector<MysqlConfig, MysqlConnection>Refactored internal result set data structures and fixed connection exceptions not being forwarded to pending results.
Fixed DATETIME, TIMESTAMP, DATE, and TIME columns not being decoded correctly
DATETIME, TIMESTAMP, DATE, and TIME columns not being decoded correctly (#120)Initial release compatible with AMPHP v3.
Initial release compatible with AMPHP v3.
As with other libraries compatible with AMPHP v3, most cases of parameters or returns of Promise<ResolutionType> have been replaced with ResolutionType.
Mysql as a prefix to interfaces and classesConnectionConfig to MysqlConfigMysqlDataType (formerly DataType) is now an enumResultSet and CommandResult into a single interface, MysqlResultMysqlConnector interface, renamed CancellableConnector to SocketMysqlConnectorResult::getColumnDefinitions() returns a list of MysqlColumnDefinition objects instead of a list of associative arrays.TransactionError, using the base class in amphp/sql insteadSecurity: fix TLS-configured client silently falls back to plain TCP and then sends the password in cleartext on mysql_clear_password
Full Changelog: https://github.com/amphp/mysql/compare/v2.1.3...v2.1.4
Full Changelog: v2.1.3...v2.1.4
Nothing published for this version
Fixed a bug when decoding a JSON field
Fixed error handling of initial packet from server
mysql_native_password authentication with MySQL 8.x (#105)Added compatibility with MySQL 8 change in default authentication, specifically caching_sha2_password.
caching_sha2_password.amphp/file@2.x.amphp/file optional.This release provides compatibility with amphp/socket v1.0. Most users of this library should be able to upgrade from 1.x to 2.0 with few to no change
This release provides compatibility with amphp/socket v1.0. Most users of this library should be able to upgrade from 1.x to 2.0 with few to no changes. Please check the list of changes below for those that may affect your code.
SELECT * FROM test WHERE classId > :id AND nodeId < :id will only require one value set for id instead of an array of values: $statement->execute(['id' => 10]). This behavior mirrors amphp/postgres and the PDO extension. (#90)ConnectionConfig constructor now takes a ConnectContext as the second argument instead of ClientTlsContext. TLS (and other connection) options can be specified using the ConnectContext object.ConnectionConfig::getTlsContext() and ConnectionConfig::withTlsContext() have been replaced with ConnectionConfig::getConnectContext() and ConnectionConfig::withConnectContext().CancellableConnector that allows a CancellationToken to be used to cancel the connection request.TimeoutConnector removed. Specify a connection timeout using ConnectContext::withTimeout() as part of ConnectionConfig or with a TimeoutCancellationToken with CancellableConnector.Statement::bindParam() now declares void as a return type.v2.0.0-RC1:This release provides compatibility with amphp/socket v1.0. Most users of this library should be able to upgrade from 1.x to 2.0 with few to no change
This release provides compatibility with amphp/socket v1.0. Most users of this library should be able to upgrade from 1.x to 2.0 with few to no changes. Please check the list of changes below for those that may affect your code.
SELECT * FROM test WHERE classId > :id AND nodeId < :id will only require one value set for id instead of an array of values: $statement->execute(['id' => 10]). This behavior mirrors amphp/postgres and the PDO extension. (#90)ConnectionConfig constructor now takes a ConnectContext as the second argument instead of ClientTlsContext. TLS (and other connection) options can be specified using the ConnectContext object.ConnectionConfig::getTlsContext() and ConnectionConfig::withTlsContext() have been replaced with ConnectionConfig::getConnectContext() and ConnectionConfig::withConnectContext().CancellableConnector that allows a CancellationToken to be used to cancel the connection request.TimeoutConnector removed. Specify a connection timeout using ConnectContext::withTimeout() as part of ConnectionConfig or with a TimeoutCancellationToken with CancellableConnector.Statement::bindParam() now declares void as a return type.Fixed port being ignored in ConnectionConfig::getConnectionString()
ConnectionConfig::getConnectionString() (#93)Added support for LOCAL DATA INFILE
LOCAL DATA INFILE (#86)Added an optional `ClientConnectContext` parameter to Connection::connect().
ClientConnectContext parameter to Connection::connect().amphp/postgres that caused the same Connector object to be returned by the connector() function in both libraries.The interface structure of this library changed significantly, however most consumers of this library should be able to upgrade from v0.3.x by only up
The interface structure of this library changed significantly, however most consumers of this library should be able to upgrade from v0.3.x by only updating the code initializing a connection or pool to use an instance of ConnectionConfig instead of a connection string. Using a connection or pool to perform queries has remained unchanged since v0.3.x, with the exception that transactions are now started with Link::beginTransaction() instead of Link::transaction().
ResultSet::getCurrent(). All rows are always returned as associate arrays.Statement and Pool that are shared with amphp/postgres are now in a separate library, amphp/sql.ConnectionConfig is now built with a list of parameters instead of a connection string. Use ConnectionConfig::fromString() to use a connection string.Operation interface has been dropped in favor of decorators. This interface was internally used to automatically free resources on destruction.Please review the interfaces in amphp/sql to ensure no other interface changes or method renames may affect your code.
Fixed an issue when a pool reached maximum size but a connection creation request was still pending, another subsequent request would enter an infinit
This release represents a major internal refactor and API refactor for similarity to the amphp/postgres library API. The query method signatures (quer
This release represents a major internal refactor and API refactor for similarity to the amphp/postgres library API. The query method signatures (query, prepare, execute) remain unchanged from the previous version. However most code using this library will likely require some changes based on list of API changes below.
Pool is now an interface. Connection and Pool share a common Link interface, so most operations can be performed using a single connection or a pool of connections. Operations using a pool automatically return the underlying connection to the pool once the operation has completed.Amp\Mysql\connect() function (returns a promise resolved with a Connection object) and connection pools created using the Amp\Mysql\pool() function.Transaction object returned by Link::transaction(). All operations performed on a Transaction object use a single underlying connection.Executor interface, implemented by connections, pools, and the Transaction object.Stmt renamed to ConnectionStatement. Statement interface added (use this interface for any type-declarations), implemented by ConnectionStatement.ResultSet has been refactored to implement Amp\Iterator. Queries returning multiple result sets may use ResultSet::nextResultSet() to move the iterator to the next result set.CommandResult object.Further documentation is in progress, for now please have a look through the code doc-blocks for more information.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
One column per quarter.