The PlanetScale Discovery Tool analyzes your existing MySQL-compatible database and cloud infrastructure to help plan your migration to PlanetScale Vitess. It collects metadata about your database configuration, schema structure, performance characteristics, replication topology, security settings, feature usage, and cloud resources. It never reads or stores actual table data. The Discovery CLI also supports PostgreSQL discovery. See the Postgres Discovery Tool guide for PlanetScale Postgres-specific details. The tool produces a structured JSON report that PlanetScale uses to provide migration guidance tailored to your environment.Documentation Index
Fetch the complete documentation index at: https://planetscale.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
The discovery tool is open source and available on GitHub. The documentation below covers the essentials. See the full documentation in the repository for advanced usage, troubleshooting, and detailed reference.
What it discovers
Database analysis:- MySQL version, distribution, configuration, server variables, and cloud platform
- Schema structure, including databases, tables, columns, indexes, constraints, views, stored routines, triggers, and partitioning
- Performance statistics such as global status counter rates, process list summaries, InnoDB lock counters, and deadlock detection
- Replication configuration, including replica status, binary log inventory, binary log retention settings, and binary log format
- Security configuration, including SSL/TLS status, authentication plugin distribution, password policy settings, and aggregate privilege summaries
- Feature usage: full-text indexes, geospatial data types, foreign key constraints, table partitioning, InnoDB compression, XA transactions, prepared statements, Galera Cluster, and more
- Database instances, clusters, and their configurations
- RDS instances, Aurora clusters, and Cloud SQL instances
- VPC networking, subnets, security groups, firewall rules, and private connectivity
- Performance metrics from cloud monitoring services
- High availability and replica configurations
Installation
The discovery tool requires Python 3.9 or later.Download and extract
Download the latest release from GitHub and extract it:
Run setup
The setup script verifies your Python version, creates a virtual environment, installs dependencies, and prompts you to install MySQL and cloud provider support:
Configure credentials
Copy the sample configuration file and edit it to include your database and cloud provider credentials:At a minimum, you need to configure your MySQL connection. See Configuration below for the full format.
pipx for a cleaner setup:
Database user setup
Create a dedicated read-only user for the discovery tool. Connect to your MySQL-compatible database as a privileged user and run the following:On Amazon RDS, Aurora MySQL, Google Cloud SQL for MySQL, MariaDB, and Percona Server, create the user through your administrative database user. Some managed services restrict access to certain system tables. The discovery tool reports those gaps and continues with the data it can collect.
PlanetScale and Vitess credentials
For PlanetScale databases, your existing branch credentials are sufficient. The discovery tool automatically detects PlanetScale and Vitess environments and adapts its queries.- The tool detects scoped
information_schemain Vitess and automatically falls back to per-database iteration - System databases such as
_vt,mysql, andperformance_schemaare excluded - Features not supported by Vitess are detected and reported
MySQL cleanup
Configuration
The discovery tool uses a YAML configuration file. Here is an example with the most common options:database to a specific database name to focus analysis on one database:
Running discovery
Run MySQL database-only analysis:config, schema, performance, replication, security, and features.
The tool produces a planetscale_discovery_results.json file in your configured output directory. Share this report with PlanetScale for migration planning assistance.
Once MySQL discovery is complete, remember to clean up the
planetscale_discovery user you created on your source database.Cloud provider setup
Each cloud provider requires specific credentials and permissions. Below is a summary of what you need for each. For detailed instructions including IAM policies and API enablement steps, see the provider documentation.AWS (RDS / Aurora)
The tool discovers RDS instances, Aurora clusters, VPC networking, security groups, and CloudWatch metrics. Authentication (choose one):- AWS profile
- IAM instance profile when running on EC2
- Access key and secret key
- IAM role assumption for cross-account access
- RDS:
DescribeDBInstances,DescribeDBClusters,DescribeDBSubnetGroups,DescribeDBClusterParameterGroups,DescribeDBParameterGroups,DescribeOptionGroups - EC2:
DescribeVpcs,DescribeSubnets,DescribeSecurityGroups,DescribeRouteTables,DescribeInternetGateways,DescribeNatGateways,DescribeVpcEndpoints - CloudWatch:
GetMetricStatistics,ListMetrics - STS:
GetCallerIdentity
Google Cloud (Cloud SQL)
The tool discovers Cloud SQL instances, VPC networks, firewall rules, and Cloud Monitoring metrics. Authentication (choose one):- Service account key file
- Application Default Credentials
- Environment variables
- Cloud SQL Admin API
- Compute Engine API
- Cloud Monitoring API

