# Aspire.Hosting.MySql

- Module: `Aspire.Hosting.MySql`
- Version: `17.0.0`
- Import path: `apphost/modules/aspire`
- Source: [GitHub](https://github.com/microsoft/aspire/tree/2d325b13709752ba6d9a943635c5e2940a2530c0)
- Functions: `10`
- Types: `3`

## Handles

- [MySqlDatabaseResource](/reference/api/go/aspire.hosting.mysql/mysqldatabaseresource.md) -- `handle` - 7 members -- A resource that represents a MySQL database. This is a child resource of a `MySqlServerResource`.
- [MySqlServerResource](/reference/api/go/aspire.hosting.mysql/mysqlserverresource.md) -- `handle` - 16 members -- A resource that represents a MySQL container.
- [PhpMyAdminContainerResource](/reference/api/go/aspire.hosting.mysql/phpmyadmincontainerresource.md) -- `handle` - 1 members

## Functions

- [AddMySql](/reference/api/go/aspire.hosting.mysql/addmysql.md) -- `method` - on `DistributedApplicationBuilder` -- Adds a MySQL server resource to the application model. For local development a container is used.
- [WithCreationScript](/reference/api/go/aspire.hosting.mysql/withcreationscript.md) -- `method` - on `MySqlDatabaseResource` -- Defines the SQL script used to create the database.
- [AddDatabase](/reference/api/go/aspire.hosting.mysql/adddatabase.md) -- `method` - on `MySqlServerResource` -- Adds a MySQL database to the application model.
- [WithDataBindMount](/reference/api/go/aspire.hosting.mysql/withdatabindmount.md) -- `method` - on `MySqlServerResource` -- Adds a bind mount for the data folder to a MySql container resource.
- [WithDataVolume](/reference/api/go/aspire.hosting.mysql/withdatavolume.md) -- `method` - on `MySqlServerResource` -- Adds a named volume for the data folder to a MySql container resource.
- [WithInitFiles](/reference/api/go/aspire.hosting.mysql/withinitfiles.md) -- `method` - on `MySqlServerResource` -- Copies init files into a MySql container resource.
- [WithPassword](/reference/api/go/aspire.hosting.mysql/withpassword.md) -- `method` - on `MySqlServerResource` -- Configures the password that the MySQL resource uses.
- [WithPhpMyAdmin](/reference/api/go/aspire.hosting.mysql/withphpmyadmin.md) -- `method` - on `MySqlServerResource` -- Adds a phpMyAdmin administration and development platform for MySql to the application model.
- [WithRepl](/reference/api/go/aspire.hosting.mysql/withrepl.md) -- `method` - on `MySqlServerResource` -- Adds a REPL command that opens an authenticated MySQL shell in the dashboard terminal dock.
- [WithHostPort](/reference/api/go/aspire.hosting.mysql/withhostport.md) -- `method` - on `PhpMyAdminContainerResource` -- Configures the host port that the PGAdmin resource is exposed on instead of using randomly assigned port.
