MySQL
MySQL is a widely used open-source relational database. DataBridge supports MySQL as an event destination for teams that use MySQL as their primary data store.
Connect via Cloud Mode
In Cloud mode, DataBridge connects directly to your MySQL instance.
- Go to Data Stores and click Connect New
- Select MySQL
- Keep the connection mode set to Cloud (default)
- Fill in the connection details:
- Name - a display label (e.g., "MySQL Production")
- Host with port - hostname and port (e.g.,
mysql.example.com:3306) - Username and Password
- Database - target database name (e.g.,
analytics)
- Click Test Connection to verify connectivity
- Click Save
Connect via DataBridge Agent
In Agent mode, the DataBridge Agent handles the connection from within your infrastructure.
- Go to Data Stores and click Connect New
- Select MySQL
- Switch the connection mode to Agent
- Fill in:
- Name - a display label
- Connection Alias - must match an alias defined in the agent's
config.yaml
- Click Save
Configuration Reference
| Name | Required | Description | Default |
|---|---|---|---|
| Host | Yes | Database hostname (without port) | localhost |
| Port | Yes | Database port | 3306 |
| SSL Mode | Yes | Connection encryption: disable or require | disable |
| Database | Yes | Target database name | default |
| Username | Yes | Database username | |
| Password | Yes | Database password | |
| Schema | Yes | Database schema |
Schema-Driven Column Types
When a JSON Schema is registered for an event, DataBridge maps each top-level property to a native MySQL column type:
| JSON Schema Type | MySQL Column Type |
|---|---|
string | TEXT |
string with format: "date-time" | DATETIME(3) |
integer | BIGINT |
number | DOUBLE |
boolean | BOOLEAN |
object | JSON |
array | JSON |
Every table also includes two metadata columns: ref_url_id TEXT and event_id TEXT.
Nested objects and arrays are stored as native JSON columns, supporting MySQL's JSON functions for querying. If no schema is registered, the table falls back to the simplified three-column layout (ref_url_id, event_id, payload).
Required Permissions
The MySQL user needs permission to create and write tables in the target database:
GRANT CREATE, INSERT, ALTER, SELECT ON analytics.* TO 'databridge_user'@'%';
FLUSH PRIVILEGES;
Testing the Connection
In Cloud mode, click Test Connection in the connection dialog before saving.
In Agent mode, verify from the agent host:
mysql -h your-mysql-host -P 3306 -u databridge_user -p analytics
Troubleshooting
Connection timed out
- Verify the host and port are correct
- Check that MySQL's
bind-addressallows remote connections - Ensure firewall rules or security groups allow traffic on port 3306
- For managed services (RDS, Cloud SQL, etc.), check the instance is accessible
Authentication failed
- Confirm the username and password
- Check the user has access from the connecting host:
SELECT host, user FROM mysql.user; - For remote connections, the user must be granted access from
%or the specific DataBridge IP
TLS / SSL errors
- If your database requires TLS, set SSL Mode to
require - If TLS is not configured on the server, set SSL Mode to
disable - For managed databases, TLS is often required by default
Character set issues
- DataBridge uses
utf8mb4by default, which supports the full Unicode range - Ensure your database and tables use a compatible character set
Tips
- Use a dedicated database for DataBridge event tables to keep them separate from application data
- For AWS RDS or Google Cloud SQL, use
requireSSL mode for encrypted connections - MySQL 8.0+ is recommended for best compatibility