Can i use MariaDB? #7384
-
I saw there's MySQL integration, can i use MariaDB, and how can i do it? Thank you! |
Beta Was this translation helpful? Give feedback.
Answered by
engineering87
Aug 6, 2025
Replies: 2 comments 1 reply
-
Hell @topfunet, var builder = DistributedApplication.CreateBuilder(args);
var mariadb = builder.AddContainer("mariadb", "mariadb", "version")
.WithEnvironment("MARIADB_ROOT_PASSWORD", "rootpass")
.WithEnvironment("MARIADB_DATABASE", "AppDb")
.WithEnvironment("MARIADB_USER", "appuser")
.WithEnvironment("MARIADB_PASSWORD", "apppass")
.WithPort(3306);
builder.AddProject<Projects.WebApi>("webapi")
.WithReference(mariadb)
.WithEnvironment("ConnectionStrings__AppDb",
"connString");
builder.Build().Run(); |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
davidfowl
-
ok, thanks. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hell @topfunet,
you can use MariaDB in Aspire by adding it as a generic container in your AppHost. Aspire doesn't have a built-in .AddMariaDb() helper yet, but you can define the container manually and pass the connection string via service discovery.
Something like: