MySQL component of testcontainers-python, providing lightweight MySQL database containers for integration testing. Compatible with testcontainers core. Current version: 0.0.1rc1 (pre-release). Release cadence: follows testcontainers-python releases (monthly).
pip install testcontainers-mysqlNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Start a MySQL 8.0 container, get connection parameters, and run a query.
Always specify an image tag: MySQLContainer('mysql:8.0').Use mysql.get_connection_params() for Python driver connections.
Ensure Docker is running and free ports are available. Use with statement for automatic cleanup.