# MySqlDatabaseResource Properties

- Package: [Aspire.Hosting.MySql](/reference/api/csharp/aspire.hosting.mysql.md)
- Type: [MySqlDatabaseResource](/reference/api/csharp/aspire.hosting.mysql/mysqldatabaseresource.md)
- Kind: `Properties`
- Members: `5`

A resource that represents a MySQL database. This is a child resource of a [MySqlServerResource](/reference/api/csharp/aspire.hosting.mysql/mysqlserverresource.md).

## ConnectionStringExpression

- Name: `ConnectionStringExpression`
- Modifiers: `get`
- Returns: `ReferenceExpression`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.MySql/MySqlDatabaseResource.cs#L35-L40)

Gets the connection string expression for the MySQL database.

```csharp
public ReferenceExpression ConnectionStringExpression { get; }
```

## DatabaseName

- Name: `DatabaseName`
- Modifiers: `get`
- Returns: `string`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.MySql/MySqlDatabaseResource.cs#L64)

Gets the database name.

```csharp
public string DatabaseName { get; }
```

## JdbcConnectionString

- Name: `JdbcConnectionString`
- Modifiers: `get`
- Returns: `ReferenceExpression`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.MySql/MySqlDatabaseResource.cs#L59)

Gets the JDBC connection string for the MySQL database.

```csharp
public ReferenceExpression JdbcConnectionString { get; }
```

## Remarks

Format: `jdbc:mysql://{host}:{port}/{database}`.

User and password credentials are not included in the JDBC connection string. Use the `IResourceWithConnectionString.GetConnectionProperties` method to access the `Username` and `Password` properties.

## Parent

- Name: `Parent`
- Modifiers: `get`
- Returns: [MySqlServerResource](/reference/api/csharp/aspire.hosting.mysql/mysqlserverresource.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.MySql/MySqlDatabaseResource.cs#L26)

Gets the parent MySQL container resource.

```csharp
public MySqlServerResource Parent { get; }
```

## UriExpression

- Name: `UriExpression`
- Modifiers: `get`
- Returns: `ReferenceExpression`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.MySql/MySqlDatabaseResource.cs#L50)

Gets the connection URI expression for the MySQL database.

```csharp
public ReferenceExpression UriExpression { get; }
```

## Remarks

Format: `mysql://{user}:{password}@{host}:{port}/{database}`.
