# PhpMyAdminContainerResource.WithHostPort

- Module: [Aspire.Hosting.MySql](/reference/api/go/aspire.hosting.mysql.md)
- Defined on: [PhpMyAdminContainerResource](/reference/api/go/aspire.hosting.mysql/phpmyadmincontainerresource.md)
- Version: `17.0.0`
- Kind: `method`

Configures the host port that the PGAdmin resource is exposed on instead of using randomly assigned port.

## Definition

```go
type PhpMyAdminContainerResource interface {
    // ... omitted for brevity
    WithHostPort(port *float64) PhpMyAdminContainerResource
}
```

## Signature

```go
WithHostPort(port *float64) PhpMyAdminContainerResource
```

## Parameters

- `port` (`*float64`) -- The port to bind on the host. If `null` is used, a random port will be assigned.

## Returns

[`PhpMyAdminContainerResource`](/reference/api/go/aspire.hosting.mysql/phpmyadmincontainerresource.md) -- The resource builder for PGAdmin.

Returns a handle; failures surface later via `Err()`.

## Defined on

- [PhpMyAdminContainerResource](/reference/api/go/aspire.hosting.mysql/phpmyadmincontainerresource.md) -- `handle`
