Overview
This guide covers common issues you might run into when importing a database to PlanetScale and how to fix them.Connection issues
Can’t connect to external database
If the connection test fails, here’s what to check: Verify your credentials locally Try connecting with the same credentials using the MySQL CLI:- Your database has a public IP address
- Public access is enabled in your database settings
- No VPN or private network is required
- Try setting SSL verification mode to
Disabledto test if SSL is the issue - If your database uses self-signed certificates, provide the full CA certificate chain
- For managed databases (RDS, Azure, etc.), use
RequiredorVerify CAmode
Connection times out
If the connection attempt times out: Firewall rules Most timeouts are caused by firewall rules blocking PlanetScale IPs. Double-check:- All IPs for your region are allowlisted
- The port (usually 3306) is open
- Any cloud provider security groups are configured correctly
- Use the cluster endpoint, not individual instance endpoints
- Default MySQL port is 3306, but some providers use different ports (DigitalOcean uses 25060)
Server configuration errors
GTID mode is OFF
Error:external database settings are not compatible with PlanetScale: "gtid_mode" must be "ON", but found: "OFF"
Solution:
You need to enable GTID mode in your database configuration.
For AWS RDS/Aurora:
- Create a custom DB parameter group
- Set
gtid-modetoON - Set
enforce_gtid_consistencytoON - Apply the parameter group to your database
- Reboot the database
- Go to Server parameters
- Set
gtid_modetoON(you may need to go through intermediate states:OFF_PERMISSIVE→ON_PERMISSIVE→ON) - Set
enforce_gtid_consistencytoON - Save changes
my.cnf or my.ini:
Binary logging not enabled
Error:external database settings are not compatible with PlanetScale: "log_bin" must be "ON", but found: "OFF"
Solution:
For AWS RDS/Aurora:
Binary logging is tied to automated backups. Enable automated backups with a retention period >= 2 days.
For GCP Cloud SQL:
Enable Point in Time Recovery (PITR) from the console.
For self-hosted:
Add to your configuration:
Wrong binlog format
Error:"binlog_format" must be "ROW", but found: "MIXED" or "STATEMENT"
Solution:
Set binlog_format to ROW in your database configuration, then restart.
For managed databases, update this in your parameter group or server parameters.
Binlog retention too short
Error:"binlog_expire_logs_seconds" must be > 172800 (or similar for expire_logs_days)
Solution:
You need at least 48 hours of binlog retention for the import to work.
For AWS RDS/Aurora:
Schema compatibility issues
No unique key on table
Error: Table has no unique key Solution: All tables must have a unique, not-null key. This is required for replication to work correctly. Add a primary key or unique index to the table:Invalid charset
Error: Table uses unsupported charset Solution: PlanetScale supports:utf8, utf8mb4, utf8mb3, latin1, and ascii.
Convert your table to a supported charset:
utf8mb4 as it has the widest character support.
Table names with special characters
Error: Table name contains unsupported characters Solution: Rename tables that have characters outside the standard ASCII set:Views detected
Views aren’t imported automatically. After your import completes, you’ll need to manually recreate any views in your PlanetScale database.Unsupported storage engine
Error: Table uses non-InnoDB storage engine Solution: Convert your tables to InnoDB:Foreign key import issues
Import slower than expected
Foreign key imports hold a long-running transaction, which can be slow on large databases. Solution: Connect to a read replica instead of your primary database. This reduces load and can improve performance.Import failed and won’t resume
Unlike regular imports, foreign key imports must start from the beginning if they fail. Solution: Before retrying:- Fix any errors that caused the failure
- Make sure your binlog retention is long enough for the full import
- Consider importing during off-peak hours
- Ensure your replica (if using one) is healthy and has minimal replication lag
Can’t select specific tables
When foreign keys are detected, all tables are automatically selected to maintain referential integrity. This is expected behavior. If you really only need specific tables, you’ll need to:- Remove foreign key constraints from your source database
- Import only the tables you need
- Recreate foreign key constraints in PlanetScale after import
Validation errors with skip option
Validation failed but can skip
For certain validation failures, you’ll see an option to skip and continue. This forces all tables to be imported. When to skip:- You understand the risks
- You’ll fix the issues in PlanetScale after import
- The validation is a false positive
- Server configuration issues (GTID, binlog) - these will cause the import to fail later
- You’re not sure what the error means
- Production import (always fix issues first)
Import monitoring issues
Replication lag is high
During the initial copy phase, high replication lag is normal. The lag should drop once the copy finishes. If lag stays high after copy completes:- Check source database load - High write activity on source can cause lag
- Slow queries - Look for slow queries or locks on the source database
- Network issues - Check for network latency between source and PlanetScale
- Large transactions - Very large transactions take time to replicate
- Reduce write load on source during import
- Wait for off-peak hours
- Check binlog retention isn’t expiring before lag catches up
Logs show errors
Check the logs section for specific error messages. Common ones: “Access denied” - Permission issues. See user requirements. “Table doesn’t exist” - Schema may have changed during import. Don’t modify schema during import. “Deadlock found” - Usually temporary. The import will retry. Connection lost - Network issue or source database restarted. The import will retry.Import stuck in “Copying” phase
The copy phase can take a while for large databases. Check:- Look at per-table progress indicators to see if it’s actually stuck or just slow
- Check logs for any errors
- Verify source database is responding
- Check source database for locks or slow queries
- Verify network connectivity
- Look for errors in logs
Permission errors
MySQL error 1045: Access denied
Error:Access denied for user 'migration_user'@'%'
Solution:
Check that your migration user has all required permissions. See our import tool user requirements.
For foreign key imports, the user needs either:
FLUSH_TABLESorRELOADprivileges (preferred)LOCK TABLESprivilege (minimum)
Can’t create vt or ps_import databases
Solution: Grant the migration user permissions on these databases:Traffic switching issues
Can’t switch replica traffic
Make sure:- Replication lag is low (under a few seconds)
- Import is in “Running” state
- No errors in logs
Can’t switch primary traffic
Make sure:- Replica traffic has been switched first
- Your application is connected to PlanetScale
- Replication lag is minimal
Data inconsistency after switching
If you notice missing or stale data after switching traffic:- Check replication lag - it may still be catching up
- Verify your application is actually connecting to PlanetScale
- Check for any errors in workflow logs
Common provider-specific issues
AWS RDS
Problem: Can’t modify GTID settings on default parameter group Solution: Create a custom DB parameter group with your MySQL version, modify settings there, then apply to your database. Problem: Binary logs not enabled Solution: Enable automated backups with retention >= 2 days.Azure
Problem: Can’t set gtid_mode directly to ON Solution: Change through intermediate states:OFF_PERMISSIVE → ON_PERMISSIVE → ON
DigitalOcean
Problem: ANSI_QUOTES mode enabled Solution: Remove ANSI_QUOTES from Global SQL mode in Settings. Problem: Binlog retention too short Solution: Set Binlog Retention Period to 86400 seconds (24 hours minimum, max available).GCP Cloud SQL
Problem: Binary logging disabled Solution: Enable Point in Time Recovery (PITR) from the GCP console.Still stuck?
If you’ve tried the solutions above and are still having issues:- Check your database’s error logs
- Review our general MySQL compatibility guide
- Look at the specific provider guide for your database
- Check workflow logs in PlanetScale for detailed error messages
- Contact PlanetScale support

