DB::MYSQL
Establish connection to MySQL Database.
Syntax
resources:
<resource-id>:
type: DB::MYSQL
props:
host: <host>
port: <port>
dbName: <database-name>
username: <username>
password: <password>
Properties
Property | Description | Type |
---|---|---|
<resource-id> | Unique identifier for the resource | string |
type | Type of the resource | string |
props | Properties specific to this resource. Refer to props section for more details. | object |
props
Property | Description | Required |
---|---|---|
host | Hostname or IP address of the database server | true |
port | Port number of the database server | true |
dbName | Name of the database to connect to | true |
username | Username for the database authentication | true |
password | Password for the database authentication | true |
Example
resources:
mysqlDb:
type: DB::MYSQL
props:
username: admin
password: password123
host: localhost
port: 3306
dbName: db_name