Connecting MySQL
Greppilot integrates with MySQL databases, enabling you to query your data and manage schema introspection through an AI-powered interface.
Connecting MySQL
To connect Greppilot to your MySQL database, provide a valid connection string. Greppilot uses this string to establish a secure connection, introspect your database schema, and enable data querying.
Your connection credentials are encrypted at rest using industry-standard encryption.
Configuration Parameters
When setting up a MySQL integration, you will provide the following parameter:
| Parameter | Type | Description |
|---|---|---|
connectionString | string | The full MySQL connection string in URL format. Example: mysql://user:password@host:3306/database_name?sslmode=require |
Connection String Validation
Greppilot performs validation checks on the connectionString to ensure connectivity and security:
- URL Format: The string must be a valid URL.
- Supported Protocols: Only
mysql://ormysql2://protocols are supported for MySQL. Other supported database types includepostgres,clickhouse,mssql. - SSRF Protection: Connections to cloud metadata endpoints (e.g.,
169.254.x.xIPs or hostnames containingmetadata) are blocked to prevent Server-Side Request Forgery (SSRF) attacks.
Capabilities
Once connected, Greppilot exposes your MySQL database through the following AI tools:
query
Execute read-only SQL SELECT queries against your database. The AI will generate appropriate queries based on your natural language requests.
// Example: Requesting data via chat
"Show me the latest 5 orders from the 'orders' table, including customer names."
schema
Retrieve the current cached schema of your MySQL database. This is used by the AI to understand the database structure without needing to re-introspect for every interaction.
refresh_schema
Trigger a full re-introspection of your MySQL database schema. Use this when your database schema has changed (e.g., new tables, columns, or modified relationships) and the AI needs updated information to ensure accuracy.