Function StackDatabaseMysql
MySQL Connect
Establish a connection to a MySQL database.
Configuration:
- Primary Connection DSL: – Defines the main database connection.
- Primary Certificat: (Optional) – Secure connection certificate for the primary database.
- Primary TLS Key: (Optional) – A unique name for the connection
- Replica Connection DSL: (Optional) – Defines a secondary connection for read operations.
- Replica Certificate: (Optional) – Secure connection certificate for the replica database.
- Replica TLS Key: (Optional) – A unique name for the connection
Outputs:
- Returns a
*MySQLDb
instance, which can be registered globally using a hook function that runs when the server starts. This instance can then be used across your API for database interactions.