Watch Aspire live streamsDocsTry Aspire

MySqlServerResource Properties

ClassProperties9 members
A resource that represents a MySQL container.
ConnectionStringExpressionSection titled ConnectionStringExpressionReferenceExpression
Gets the connection string expression for the MySQL server.
public ReferenceExpression ConnectionStringExpression { get; }
DatabasesSection titled DatabasesIReadOnlyDictionary<string, string>
A dictionary where the key is the resource name and the value is the database name.
public IReadOnlyDictionary<string, string> Databases { get; }
HostSection titled HostEndpointReferenceExpression
Gets the host endpoint reference for this resource.
public EndpointReferenceExpression Host { get; }
JdbcConnectionStringSection titled JdbcConnectionStringReferenceExpression
Gets the JDBC connection string for the MySQL server.
public ReferenceExpression JdbcConnectionString { get; }

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

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

PasswordParameterSection titled PasswordParameterParameterResource
Gets or sets the parameter that contains the MySQL server password.
public ParameterResource PasswordParameter { get; set; }
PortSection titled PortEndpointReferenceExpression
Gets the port endpoint reference for this resource.
public EndpointReferenceExpression Port { get; }
PrimaryEndpointSection titled PrimaryEndpointEndpointReference
Gets the primary endpoint for the MySQL server.
public EndpointReference PrimaryEndpoint { 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 server.
public ReferenceExpression UriExpression { get; }
Format: mysql://{user}:{password}@{host}:{port}.