Skip to main content

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:

DatabaseType EnumType ID
MySQLMYSQLmysql
PostgreSQLPOSTGRESQLpostgresql
Microsoft SQL ServerMSSQLmssql
MariaDBMARIADBmariadb
Aurora (MySQL/PostgreSQL)AURORAaurora
Azure SQLAZURE_SQLazure-sql
Google Cloud SQLGCLOUD_SQLgcloud-sql
IBM Db2IBMDB2ibmdb2

All use the Database category and share the DBConnectionDetails entity class.

Friendly Example

What you enterExample
Connection namePostgreSQL - Reporting Database
Used forReading approved rows for reports and reconciliation jobs
Main details to collectHost, port, database name, username, password, and SSL requirement
Best person to provide itDatabase administrator

After it is saved, workflow builders select PostgreSQL - Reporting Database in a node instead of entering these details again.

Mandatory Fields

FieldTypeRequiredDescription
databaseDatabaseTypeYesDatabase engine type. One of: MYSQL, POSTGRESQL, ORACLE, SQL_SERVER, DB2.
jdbcUrlStringYesFull JDBC connection URL including host, port, and database name. See format examples below.
usernameStringYesDatabase login username.
passwordStringYesDatabase login password. Encrypted at rest.

Advanced Fields

FieldTypeRequiredDescription
authenticationStringNoAuthentication method. Defaults to password. Set to IAM for AWS IAM database authentication.
regionStringNoAWS 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:

DatabaseJDBC URL FormatExample
MySQLjdbc:mysql://\{host\}:\{port\}/\{database\}jdbc:mysql://db.contoso.com:3306/orders
PostgreSQLjdbc:postgresql://\{host\}:\{port\}/\{database\}jdbc:postgresql://db.contoso.com:5432/analytics
SQL Serverjdbc:sqlserver://\{host\}:\{port\};databaseName=\{database\}jdbc:sqlserver://db.contoso.com:1433;databaseName=inventory
MariaDBjdbc:mariadb://\{host\}:\{port\}/\{database\}jdbc:mariadb://db.contoso.com:3306/orders
Db2jdbc: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

  1. 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;
  2. 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).

  3. Construct the JDBC URL with the correct host, port, database name, and any SSL parameters.

  4. Create the connection in the Global Configurator.

  5. Test the connection to verify credentials and network access.

Troubleshooting

SymptomLikely Cause
Communications link failure / Connection refusedDatabase is not reachable. Check host, port, firewall rules, and security groups.
Access denied for userWrong username or password, or the user is not allowed to connect from the platform's IP.
Unknown databaseThe database name in the JDBC URL does not exist on the server.
SSL connection errorSSL is required by the server but not configured in the JDBC URL, or the certificate is not trusted.
Too many connectionsThe database has reached its max connection limit. Consider connection pooling or increasing the limit.