MySQL (Source) Connector
Prerequisites
- A MySQL database (5.7+ or 8.0+)
- A user with
SELECTprivileges on the tables you want to sync - Network connectivity from Landed to your MySQL server
Getting Your Credentials
Step 1: Create a Read-Only User (Recommended)
Connect to your MySQL server and create a dedicated user for Landed:
CREATE USER 'landed_reader'@'%' IDENTIFIED BY 'your-secure-password';
GRANT SELECT ON mydb.* TO 'landed_reader'@'%';
FLUSH PRIVILEGES;
Replace mydb with your database name, or grant access to specific tables:
GRANT SELECT ON mydb.orders TO 'landed_reader'@'%';
GRANT SELECT ON mydb.customers TO 'landed_reader'@'%';
Step 2: Allow Network Access
Ensure your MySQL server accepts connections from Landed's IP addresses. You may need to:
- Cloud-hosted databases (RDS, Cloud SQL, Azure): Add Landed's static IPs to the security group or authorized networks
- Self-hosted databases: Update your firewall rules to allow inbound connections on your MySQL port
- VPN/Private network: Set up a VPN tunnel or SSH bastion (contact Landed support)
Configuration in Landed
| Field | Value |
|---|---|
| Host | Hostname or IP of your MySQL server (e.g., db.example.com) |
| Port | MySQL port (default: 3306) |
| Database | Database name to connect to |
| Username | MySQL username (e.g., landed_reader) |
| Password | Password for the MySQL user |
| Tables to sync (optional) | Specific tables to sync (e.g., mydb.orders). Leave empty to discover all accessible tables. |
Available Streams
The MySQL connector dynamically discovers all tables the configured user can access. Each table becomes a stream.
Sync modes:
- Tables with a cursor field (e.g.,
updated_at,modified_at) sync incrementally - Tables without a cursor field sync via full refresh
You can configure per-table cursor fields in the connector settings to enable incremental sync for specific tables.
Common Issues
| Symptom | Cause | Fix |
|---|---|---|
Can't connect to MySQL server | Network connectivity issue | Verify the host, port, and firewall rules. Add Landed's IPs to your security group. |
Access denied for user | Wrong credentials | Verify username and password |
SELECT command denied | User lacks SELECT privilege | Run GRANT SELECT ON mydb.* TO 'landed_reader'@'%'; |
| Missing tables | User lacks access to specific tables | Grant SELECT on the specific tables |
Unknown database | Database name incorrect | Verify the database name exists on the server |
| Slow sync | Large tables without cursor field | Configure a cursor field (e.g., updated_at) for incremental sync |
Static IPs for Allowlisting
Add these IPs to your database security group or firewall:
- Production:
34.170.185.84,35.192.90.94 - Staging:
34.171.93.34
Security Recommendations
- Use a dedicated read-only user with minimal privileges
- Enable SSL/TLS for the database connection when possible
- Restrict the user to SELECT on only the tables you need synced
- Use strong passwords and rotate them periodically