Overview
Quail’s connection management system allows you to securely connect to your databases with encrypted credentials. All connections are stored with encryption and support multiple database types including PostgreSQL, MySQL, and SQL Server.Setting Up Your First Connection
Navigate to Connections
From the main navigation menu, click on Connections to access the connection management page.
Select Database Type
Choose your database type from the dropdown menu:
- PostgreSQL
- MySQL
- SQL Server
- Other supported databases
Enter Connection Details
Fill in the required connection information:
- Connection Name: A friendly name you’ll recognize (e.g., “Production DB”, “Analytics Warehouse”)
- Connection String: Your database connection string in the format:
- SSL Settings: Configure SSL requirements if your database requires secure connections
Your connection credentials are encrypted and stored securely. Quail never stores your passwords in plain text.
Whitelisting Quail’s IP Address
How to Whitelist by Provider
- AWS RDS
- Azure SQL
- GCP Cloud SQL
- MongoDB Atlas
- Go to your RDS console in AWS
- Select your database instance
- Click on the Security Group associated with your instance
- Under Inbound Rules, add a new rule
- Enter Quail’s IP address and your database port (typically 5432 for PostgreSQL, 3306 for MySQL)
- Save the security group changes
Testing Your Connection
After configuring your connection, it’s important to verify that Quail can successfully connect to your database.Wait for Results
Quail will attempt to establish a connection to your database. This typically takes a few seconds.
Review the Results
- Success: You’ll see a green checkmark and success message. Your connection is ready to use.
- Failure: You’ll see an error message with details about what went wrong. See Troubleshooting below.
Managing Your Connections
Viewing Connection Details
Click on any connection in your connections list to view:- Connection Status: Active or inactive indicator
- Last Connected: Timestamp of the most recent successful connection
- Database Schema: Browse available tables, views, and their structures
- Connection Type: The database type (PostgreSQL, MySQL, etc.)
Editing a Connection
Deleting a Connection
Confirm Deletion
A confirmation dialog will appear. Review the warning about affected charts and dashboards.
Exploring Your Database Schema
Once connected, Quail automatically fetches and displays your database schema, making it easy to explore your data structure.Browse Tables
The left sidebar displays all tables and views in your database. Tables are organized by schema if your database uses schemas.
View Table Details
Click on any table name to see:
- Column names and data types
- Primary and foreign keys
- Indexes
- Relationships with other tables
The Schema Explorer is also available in the SQL Editor and Chat interfaces, making it easy to reference your data structure while writing queries or asking questions.
Troubleshooting Connection Issues
If you’re experiencing problems connecting to your database, here are common issues and solutions:Connection Timeout
Possible causes:
- Database server is not running
- Quail’s IP address is not whitelisted
- Firewall blocking connections on the database port
- Incorrect host or port in connection string
- Verify your database server is running
- Double-check IP whitelisting settings
- Confirm firewall rules allow traffic on your database port
- Verify the host and port in your connection string
Authentication Failed
Possible causes:
- Incorrect username or password
- User doesn’t have required permissions
- Password contains special characters not properly escaped
- Double-check your username and password
- Ensure the user has SELECT permissions on the database
- Try URL-encoding special characters in your connection string
SSL/TLS Errors
Possible causes:
- SSL settings don’t match database requirements
- Database requires SSL but connection doesn’t specify it
- Invalid SSL certificate
- Check if your database requires SSL connections
- Add
?sslmode=requireto your connection string if needed - Verify SSL certificate is valid and not expired
Database Not Found
Possible causes:
- Database name is misspelled
- Database doesn’t exist on the server
- User doesn’t have access to the specified database
- Confirm the database name spelling
- Verify the database exists on your server
- Check that your user has access to this specific database
Best Practices
Security
- Use Read-Only Accounts: Create database users with read-only permissions for Quail connections
- Rotate Credentials: Regularly update database passwords and connection strings
- Enable SSL: Always use SSL/TLS connections when available
- Limit Access: Only whitelist Quail’s IP address, not broad IP ranges
Performance
- Use Connection Pooling: For high-traffic databases, ensure your database has adequate connection pooling configured
- Monitor Connections: Keep track of active connections in your connections list
- Close Unused Connections: Remove connections you’re no longer using
Organization
- Descriptive Names: Use clear, descriptive names for your connections (e.g., “Production Analytics”, “Staging Customer DB”)
- Consistent Naming: Establish a naming convention for your team
- Document Connections: Add notes about what each connection is used for
