SQL Database Connection
The SQL Database connection type enables automations to execute queries, run stored procedures, and perform data operations against relational databases. It is used by the plugin-sql-databases plugin, which delegates to the sql-database-connector.
Connection Type
Multiple ConnectionType values map to SQL databases. Use the one that matches your database engine:
| Database | Type Enum | Type ID |
|---|---|---|
| MySQL | MYSQL | mysql |
| PostgreSQL | POSTGRESQL | postgresql |
| Microsoft SQL Server | MSSQL | mssql |
| MariaDB | MARIADB | mariadb |
| Aurora (MySQL/PostgreSQL) | AURORA | aurora |
| Azure SQL | AZURE_SQL | azure-sql |
| Google Cloud SQL | GCLOUD_SQL | gcloud-sql |
| IBM Db2 | IBMDB2 | ibmdb2 |
All use the Database category and share the DBConnectionDetails entity class.
Friendly Example
| What you enter | Example |
|---|---|
| Connection name | PostgreSQL - Reporting Database |
| Used for | Reading approved rows for reports and reconciliation jobs |
| Main details to collect | Host, port, database name, username, password, and SSL requirement |
| Best person to provide it | Database administrator |
After it is saved, workflow builders select PostgreSQL - Reporting Database in a node instead of entering these details again.
Mandatory Fields
| Field | Type | Required | Description |
|---|---|---|---|
database | DatabaseType | Yes | Database engine type. One of: MYSQL, POSTGRESQL, ORACLE, SQL_SERVER, DB2. |
jdbcUrl | String | Yes | Full JDBC connection URL including host, port, and database name. See format examples below. |
username | String | Yes | Database login username. |
password | String | Yes | Database login password. Encrypted at rest. |
Advanced Fields
| Field | Type | Required | Description |
|---|---|---|---|
authentication | String | No | Authentication method. Defaults to password. Set to IAM for AWS IAM database authentication. |
region | String | No | AWS region. Required only when authentication is set to IAM. |
JDBC URL Format
The jdbcUrl must follow the standard JDBC format for the target database engine:
| Database | JDBC URL Format | Example |
|---|---|---|
| MySQL | jdbc:mysql://\{host\}:\{port\}/\{database\} | jdbc:mysql://db.contoso.com:3306/orders |
| PostgreSQL | jdbc:postgresql://\{host\}:\{port\}/\{database\} | jdbc:postgresql://db.contoso.com:5432/analytics |
| SQL Server | jdbc:sqlserver://\{host\}:\{port\};databaseName=\{database\} | jdbc:sqlserver://db.contoso.com:1433;databaseName=inventory |
| MariaDB | jdbc:mariadb://\{host\}:\{port\}/\{database\} | jdbc:mariadb://db.contoso.com:3306/orders |
| Db2 | jdbc:db2://\{host\}:\{port\}/\{database\} | jdbc:db2://db.contoso.com:50000/sample |
SSL/TLS in JDBC URLs
To enable encrypted connections, append SSL parameters to the JDBC URL:
MySQL:
jdbc:mysql://db.contoso.com:3306/orders?useSSL=true&requireSSL=true&verifyServerCertificate=true
PostgreSQL:
jdbc:postgresql://db.contoso.com:5432/analytics?ssl=true&sslmode=verify-full
PostgreSQL sslmode options: disable, allow, prefer, require, verify-ca, verify-full.
SQL Server:
jdbc:sqlserver://db.contoso.com:1433;databaseName=inventory;encrypt=true;trustServerCertificate=false
Setup Instructions
-
Create a dedicated database user for automation use. Grant only the permissions required by your workflows:
-- MySQL example
CREATE USER 'qinfinite_automation'@'%' IDENTIFIED BY 'strong-password';
GRANT SELECT, INSERT, UPDATE, DELETE ON orders.* TO 'qinfinite_automation'@'%';
FLUSH PRIVILEGES;-- PostgreSQL example
CREATE USER qinfinite_automation WITH PASSWORD 'strong-password';
GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA public TO qinfinite_automation; -
Ensure network connectivity between the Qinfinite platform and the database server. The database port must be reachable (default: 3306 for MySQL, 5432 for PostgreSQL, 1433 for SQL Server).
-
Construct the JDBC URL with the correct host, port, database name, and any SSL parameters.
-
Create the connection in the Global Configurator.
-
Test the connection to verify credentials and network access.
Troubleshooting
| Symptom | Likely Cause |
|---|---|
Communications link failure / Connection refused | Database is not reachable. Check host, port, firewall rules, and security groups. |
Access denied for user | Wrong username or password, or the user is not allowed to connect from the platform's IP. |
Unknown database | The database name in the JDBC URL does not exist on the server. |
SSL connection error | SSL is required by the server but not configured in the JDBC URL, or the certificate is not trusted. |
Too many connections | The database has reached its max connection limit. Consider connection pooling or increasing the limit. |