Excontainers.MySqlContainer (excontainers v0.3.1) View Source

Functions to build and interact with MySql containers.

Link to this section Summary

Functions

Returns the connection parameters to connect to the database from the host machine.

Builds a MySql container.

Returns the port on the host machine where the MySql container is listening.

Link to this section Functions

Link to this function

connection_parameters(pid)

View Source

Returns the connection parameters to connect to the database from the host machine.

Link to this function

new(image \\ "mysql:8.0", opts \\ [])

View Source

Builds a MySql container.

Uses MySql 8.0 by default, but a custom image can also be set.

Options

  • username sets the username for the user
  • password sets the password for the user
  • database sets the name of the database

Returns the port on the host machine where the MySql container is listening.