Overview
What is JDBC MySQL: JDBC MySQL uses Java Database Connectivity and MySQL Connector/J, maintained by Oracle, as the standard MySQL database connection pattern. It opens direct TCP connections to MySQL databases, allowing applications and Datagrid agents to work with tables, views, and query results via a JDBC driver. Connector/J is a Type 4 driver, a pure-Java implementation of the MySQL protocol, and does not work through REST APIs or webhooks.
How to integrate JDBC MySQL with Datagrid
Datagrid's JDBC MySQL integration brings MySQL tables and views, as well as query results, into Datagrid workflows. Once connected, agents run checks against the specific tables defined by each workflow, pull structured rows into processing workflows, and prepare outputs for warehouse, CRM, and cloud storage destinations. The data flow runs one way: MySQL is the source, and Datagrid agents process the records. This integration covers scheduled source reads from MySQL into Datagrid workflows; it does not write records back to MySQL or replace database administration tools. Create the connection, confirm the credentials and sync the scope before agents process records.
Create the JDBC MySQL connection
Start in Datagrid and enter the database fields required for a JDBC connection.
In Datagrid, go to the JDBC MySQL integration under the Databases header.
Click Setup Integration.
Click Create a Connection.
Enter your MySQL connection details:
Host: the MySQL host address
Port: 3306 unless your MySQL server uses a custom JDBC port
Database name: the database Datagrid should query
Username: the MySQL user for the connection
Password: the password for that MySQL user
SSL mode: the Connector/J SSL mode required by your environment
A typical JDBC URL follows this pattern:
jdbc:mysql://mysql.example.com/production?sslMode=VERIFY_IDENTITYA matching field mapping looks like this:
host=mysql.example.com
port=<configured-port>
database=production
username=datagrid_reader
sslMode=VERIFY_IDENTITYYour MySQL instance must have a publicly routable host address for the JDBC MySQL integration. Confirm your firewall permits inbound connections on the configured database port.
Configure authentication
Datagrid authenticates via JDBC with a username and password and accepts SSL/TLS modes that match Connector/J's sslMode property: DISABLED, PREFERRED, REQUIRED, VERIFY_CA, and VERIFY_IDENTITY. Use VERIFY_IDENTITY for production certificate validation. Connector/J may attempt SSL by default when the MySQL server uses SSL, but DISABLED disables encryption and should not be used in production.
A production authentication property set can follow this pattern:
user=datagrid_reader
password=<stored-secret>
sslMode=VERIFY_IDENTITYDefine data sync details
Define what Datagrid queries are before assigning agent workflows to the connection. Datagrid syncs MySQL tables and views, as well as query results, into workflow execution, moving data from MySQL into Datagrid workflows. Agents query on a schedule, so sync timing follows the schedules you define per workflow.
Document an example sync scope like this before you assign workflows:
source=mysql.production
object=finance.journal_entries
mode=scheduled_query
schedule=workflow-defined
destination=datagrid.workflow.journal_entry_validationConfirm the connection details and sync scope before assigning agents to production workflows.
Why use JDBC MySQL with Datagrid
Use JDBC MySQL with Datagrid when structured production records need agent execution, replacing manual export and re-keying work handled by one-off scripts.
Current production records: Agents query MySQL rows, so operations and data teams can work from current production records.
Scheduled query execution: Agents run table queries on a schedule and feed results into processing workflows without anyone triggering a job.
Entity extraction and cross-referencing: Agents classify text fields, extract entities, and cross-reference related datasets inside each synced row set.
Downstream validation and enrichment: Transformed results become finance validation outputs and CRM enrichment updates, with monitoring exceptions also available from a single MySQL source.
Configurable SSL modes: Teams can choose Connector/J SSL modes and apply certificate validation standards that match their environment.
Standard JDBC compatibility: Setup stays close to Connector/J patterns, so existing MySQL hosts work without new server-side tooling.
What you can build with JDBC MySQL Datagrid integration
JDBC MySQL provides Datagrid agents with structured records they can validate and enrich before routing within operational workflows.
Automated record classification pipelines: Agents read customer or transaction tables, use data processing agents to classify text fields, and route extracted entities to downstream systems. Example: tagging support records by issue type and pushing labeled rows to your CRM.
Journal entry validation for finance teams: Agents ingest journal entries directly from the database, validate account codes and dates, and verify amounts for each entry. One documented deployment reclaimed finance time previously spent re-keying and reconciling data.
Cross-platform data sync workflows: MySQL data flows into warehouse and lakehouse destinations, as well as databases and cloud storage, with agents reasoning about whether records are correct in context and whether dependencies hold as records move between systems.
Sensor and monitoring data validation: Agents connect to MySQL as a structured store for instrument readings. Configured sanity checks flag out-of-range values and sensor drift, and MySQL-stored historical readings feed long-term trend analysis.
Resources and documentation
Configuration properties: Check Connector/J property names and defaults before adding connection properties.
SSL/TLS configuration: Review when Connector/J requires client-side SSL settings.
Troubleshooting guide: Use driver diagnostics for connection exceptions and authentication errors.
Frequently asked questions
What is the MySQL JDBC URL format?
The generic structure is protocol//[hosts][/database][?properties], with jdbc:mysql: as the standard scheme. Properties append after ? as case-sensitive key=value pairs separated by &. Full syntax includes multi-host and load-balancing variants.
How does Datagrid secure the connection?
Datagrid's integration uses username and password authentication over JDBC and accepts SSL/TLS. The five accepted modes match Connector/J's sslMode property: DISABLED, PREFERRED, REQUIRED, VERIFY_CA, and VERIFY_IDENTITY. On Connector/J 8.0.13+, a server correctly configured to use SSL does not require client-side configuration.
How do I fix "Public Key Retrieval is not allowed" errors?
This error occurs when connecting to MySQL 8+ accounts using caching_sha2_password over non-SSL connections; the driver cannot retrieve the RSA public key to encrypt the password. Enable SSL for production, or add allowPublicKeyRetrieval=true for development only. The property defaults to false, and Oracle warns that the setting is prone to man-in-the-middle attacks.
How do I resolve authentication failures after upgrading to MySQL 8.4?
MySQL Server 8.4 disables mysql_native_password by default, per the 8.4.0 release notes. Accounts still using that legacy plugin fail to authenticate. Migrate accounts to caching_sha2_password, the server default since MySQL 8.0.4, or re-enable the legacy plugin with --mysql-native-password=ON as described in the native authentication documentation.
How do I troubleshoot "Communications link failure" errors?
This exception means the MySQL server is unreachable over the network. Common causes include a firewall blocking port 3306, DNS resolution issues, MySQL bound to a specific IP, or localhost resolving to IPv6. Verify the port is open, try the server IP instead of the hostname, and check MySQL listener bindings with netstat -an. Datagrid also requires a publicly routable MySQL host address, so private-subnet instances need network changes first.
Similar integrations
Azure PostgreSQL Database: A managed PostgreSQL alternative or destination for MySQL data when building cross-database AI workflows.
PostgreSQL: A common relational counterpart for schema migration and analytics, as well as cross-platform syncing with MySQL source data.
MariaDB: Shares MySQL compatibility and binlog behavior, relevant for migration and CDC, plus mirrored JDBC usage patterns.
Azure MySQL Database: Cloud-hosted MySQL on Azure uses identical JDBC patterns and is a common managed MySQL source for cross-system AI workflows.
Amazon Aurora: Provides MySQL-compatible endpoints, so teams can reuse JDBC MySQL integrations for cloud-native scaling and analytics.
Amazon RDS: Hosts MySQL and MariaDB instances; managed database connectivity commonly requires JDBC configuration and network allowlisting.