Skip to content

Add article for CommunityToolkit.Aspire.Hosting.MySql.Extensions #3664

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions docs/community-toolkit/hosting-mysql-extensions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
title: MySql hosting extensions
description: Learn how to use the .NET Aspire MySql extensions package which provides extra functionality to the .NET Aspire MySql hosting package.
ms.date: 05/28/2025
author: Alirexaa
---

# .NET Aspire Community Toolkit MySql hosting extensions

[!INCLUDE [includes-hosting](../includes/includes-hosting.md)]

[!INCLUDE [banner](includes/banner.md)]

In this article, you learn about the .NET Aspire Community Toolkit MySql hosting extensions package which provides extra functionality to the .NET Aspire [MySql hosting package](https://nuget.org/packages/Aspire.Hosting.MySql).

This package provides the following features:

- [Adminer](https://adminer.org/) management UI
- [DbGate](https://dbgate.org/) management UI

## Hosting integration

To get started with the .NET Aspire Community Toolkit MySql hosting extensions, install the [📦 CommunityToolkit.Aspire.Hosting.MySql.Extensions](https://nuget.org/packages/CommunityToolkit.Aspire.Hosting.MySql.Extensions) NuGet package in the AppHost project.

### [.NET CLI](#tab/dotnet-cli)

```dotnetcli
dotnet add package CommunityToolkit.Aspire.Hosting.MySql.Extensions
```

### [PackageReference](#tab/package-reference)

```xml
<PackageReference Include="CommunityToolkit.Aspire.Hosting.MySql.Extensions"
Version="*" />
```

---

For more information, see [dotnet add package](/dotnet/core/tools/dotnet-add-package) or [Manage package dependencies in .NET applications](/dotnet/core/tools/dependencies).

## Example usage

To add the DbGate management UI to your MySql resource, call the `WithDbGate` method on the `MySqlServerResourceBuilder` instance.

```csharp
var mysql = builder.AddMySql("mysql")
.WithDbGate();
```

To add the Adminer management UI to your MySql resource, call the `WithAdminer` method on the `MySqlServerResourceBuilder` instance.

```csharp
var mysql = builder.AddMySql("mysql")
.WithAdminer();
```

This will add a new resource to the app host which will be available from the .NET Aspire dashboard.
2 changes: 2 additions & 0 deletions docs/community-toolkit/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ To expand the functionality provided by the .NET Aspire integrations, the Commun
- [📄 Docs](hosting-redis-extensions.md)
- [📦 CommunityToolkit.Aspire.Hosting.MongoDB.Extensions](https://nuget.org/packages/CommunityToolkit.Aspire.Hosting.MongoDB.Extensions)
- [📄 Docs](hosting-mongodb-extensions.md)
- [📦 CommunityToolkit.Aspire.Hosting.MySql.Extensions](https://nuget.org/packages/CommunityToolkit.Aspire.Hosting.MySql.Extensions)
- [📄 Docs](hosting-mysql-extensions.md)

If you're not seeing an integration or extension you need, you can contribute to the toolkit by creating your own integration and submitting a pull request. For more information, see [How to collaborate](#how-to-collaborate).

Expand Down
2 changes: 2 additions & 0 deletions docs/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,8 @@ items:
href: community-toolkit/hosting-redis-extensions.md
- name: PostgreSQL Extensions
href: community-toolkit/hosting-postgresql-extensions.md
- name: MySql Extensions
href: community-toolkit/hosting-mysql-extensions.md
- name: RavenDB
href: community-toolkit/ravendb.md
- name: Aspire.Hosting API reference
Expand Down
Loading