MySQL
Versions
| Version | Status | Notes |
|---|---|---|
| 8.4 | Available | Recommended |
| 8.0 | Available |
Connecting
| Parameter | Value |
|---|---|
| Host | {name}.db.foundrydb.com |
| Port | 3306 |
| Default database | defaultdb |
| TLS | Required |
mysql -h HOST -u USER -pPASS defaultdb --ssl-mode=REQUIRED
Full connection string examples: Connection Strings →
Connection Pooling (ProxySQL)
ProxySQL is available on port 6033. Enable it:
curl -u admin:password -X POST \
https://api.foundrydb.com/managed-services/{id}/pooler \
-H "Content-Type: application/json" \
-d '{"pool_size": 25}'
ProxySQL handles connection multiplexing, query routing to replicas, and automatic reconnection on failover.
Read Replicas
Add a replica:
curl -u admin:password -X POST \
https://api.foundrydb.com/managed-services/{id}/nodes \
-H "Content-Type: application/json" \
-d '{"role": "replica"}'
Replication uses GTID mode for reliable, position-free failover.
Failover
Promote a replica to primary:
curl -u admin:password -X POST \
https://api.foundrydb.com/managed-services/{id}/nodes/{node_id}/failover
After failover, the old primary becomes a replica. ProxySQL (if enabled) updates its routing automatically.
Point-in-Time Recovery
Continuous binlog archiving. Restore to any timestamp:
curl -u admin:password -X POST \
https://api.foundrydb.com/managed-services/{id}/backups/restore \
-H "Content-Type: application/json" \
-d '{
"restore_point": "2026-03-15T14:30:00Z",
"target_service_name": "my-mysql-restored"
}'
Configuration
curl -u admin:password -X PATCH \
https://api.foundrydb.com/managed-services/{id}/configuration \
-H "Content-Type: application/json" \
-d '{
"parameters": {
"innodb_buffer_pool_size": "2G",
"max_connections": "500",
"slow_query_log": "ON",
"long_query_time": "1"
}
}'
Common parameters:
| Parameter | Default | Description |
|---|---|---|
innodb_buffer_pool_size | 128MB | InnoDB cache — set to 70–80% of RAM |
max_connections | 151 | Max simultaneous connections |
slow_query_log | OFF | Enable slow query logging |
long_query_time | 10 | Threshold in seconds for slow query log |
innodb_flush_log_at_trx_commit | 1 | Durability vs performance (1=full, 2=fast) |
max_allowed_packet | 64MB | Max packet/BLOB size |
Metrics
curl -u admin:password \
"https://api.foundrydb.com/managed-services/{id}/metrics?metric=connections&period=1h"
Key metrics: connections, queries_per_second, innodb_buffer_pool_hit_rate, replication_lag_seconds.
Backups
# List backups
curl -u admin:password \
https://api.foundrydb.com/managed-services/{id}/backups
# Trigger manual backup
curl -u admin:password -X POST \
https://api.foundrydb.com/managed-services/{id}/backups \
-H "Content-Type: application/json" \
-d '{"backup_type": "manual"}'
Version Notes
MySQL 8.4: mysql_native_password authentication plugin is disabled by default. Use caching_sha2_password (the default) or sha256_password. Most modern drivers support this. If you see authentication errors, upgrade your driver.