Watch Aspire live streamsDocsTry Aspire

MySqlDatabaseResource Properties

ClassProperties6 members
A resource that represents a MySQL database. This is a child resource of a MySqlServerResource.
ConnectionStringExpressionSection titled ConnectionStringExpressionReferenceExpression
Gets the connection string expression for the MySQL database.
public ReferenceExpression ConnectionStringExpression { get; }
DatabaseNameSection titled DatabaseNamestring
Gets the database name.
public string DatabaseName { get; }
JdbcConnectionStringSection titled JdbcConnectionStringReferenceExpression
Gets the JDBC connection string for the MySQL database.
public ReferenceExpression JdbcConnectionString { get; }

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.

Gets the parent MySQL container resource.
public MySqlServerResource Parent { get; }
ResourceTypeDisplayNameSection titled ResourceTypeDisplayNameoverridestring
Gets the default human-readable name of this resource's type.
public override string ResourceTypeDisplayName { get; }
Override this property to identify the service, such as Redis or PostgreSQL Server, independently of its technical resource type. The default is the resource type. This label does not change the resource name, service discovery, or OpenTelemetry identity. Use ResourceBuilderExtensions.WithResourceTypeDisplayName to override the label for an instance.
UriExpressionSection titled UriExpressionReferenceExpression
Gets the connection URI expression for the MySQL database.
public ReferenceExpression UriExpression { get; }
Format: mysql://{user}:{password}@{host}:{port}/{database}.