Skip to content
Docs Try Aspire

MySqlDatabaseResource Properties

Class Properties 5 members
A resource that represents a MySQL database. This is a child resource of a MySqlServerResource.
ConnectionStringExpression Section titled ConnectionStringExpression ReferenceExpression
Gets the connection string expression for the MySQL database.
public ReferenceExpression ConnectionStringExpression { get; }
DatabaseName Section titled DatabaseName string
Gets the database name.
public string DatabaseName { get; }
JdbcConnectionString Section titled JdbcConnectionString ReferenceExpression
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; }
UriExpression Section titled UriExpression ReferenceExpression
Gets the connection URI expression for the MySQL database.
public ReferenceExpression UriExpression { get; }
Format: mysql://{user}:{password}@{host}:{port}/{database}.