MySQL & MariaDB
Connect Querri to your MySQL or MariaDB database to analyze data using natural language. Once connected, simply ask questions—Querri handles all the SQL for you.
Overview
Section titled “Overview”The MySQL connector supports:
- MySQL 5.7+: All modern MySQL versions
- MySQL 8.0+: Full support including new features
- MariaDB 10.x: All MariaDB versions
- AWS RDS MySQL: Managed MySQL on AWS
- Azure Database for MySQL: Managed MySQL on Azure
- Google Cloud SQL for MySQL: Managed MySQL on GCP
Prerequisites
Section titled “Prerequisites”- MySQL or MariaDB database server
- Database credentials with appropriate permissions
- Network access to the database
IP Whitelisting
Section titled “IP Whitelisting”Important: For cloud-hosted databases or databases behind firewalls, whitelist the following IP address:
18.189.33.77This is Querri’s outbound IP address. Add this to your database firewall rules or security group.
Creating the Connector
Section titled “Creating the Connector”-
Navigate to Connectors
- Go to Settings → Connectors
- Click “Add Connector”
-
Select MySQL
- Choose “MySQL” from the database connectors
-
Configure Connection
Host: your-database-host.comPort: 3306 (default MySQL port)Database: your_database_nameUsername: your_usernamePassword: your_passwordOptional Settings:
- SSL: Enable for encrypted connections
- Charset: Default is
utf8mb4 - Connection Timeout: Default is 30 seconds
-
Test Connection
- Click “Test Connection” to verify
- If successful, click “Save”
-
Start Analyzing
- Tables appear in your Library
- Create a project from any table
- Ask questions in natural language
Network Configuration
Section titled “Network Configuration”AWS RDS Security Groups
Section titled “AWS RDS Security Groups”Add inbound rule:
Type: MySQL/AuroraProtocol: TCPPort: 3306Source: 18.189.33.77/32Description: Querri AccessAzure MySQL Firewall
Section titled “Azure MySQL Firewall”Add firewall rule:
Rule Name: QuerriStart IP: 18.189.33.77End IP: 18.189.33.77Google Cloud SQL
Section titled “Google Cloud SQL”Add authorized network:
Name: QuerriNetwork: 18.189.33.77/32Database User Setup
Section titled “Database User Setup”Read-Only User (Recommended)
Section titled “Read-Only User (Recommended)”Create a dedicated read-only user for Querri:
-- Create userCREATE USER 'querri_readonly'@'%'IDENTIFIED BY 'secure_password_here';
-- Grant read permissionsGRANT SELECT ON your_database.* TO 'querri_readonly'@'%';
-- Apply changesFLUSH PRIVILEGES;Restricting Access to Specific Tables
Section titled “Restricting Access to Specific Tables”For tighter security, grant access only to specific tables:
-- Create userCREATE USER 'querri_readonly'@'%' IDENTIFIED BY 'secure_password_here';
-- Grant access to specific tables onlyGRANT SELECT ON your_database.orders TO 'querri_readonly'@'%';GRANT SELECT ON your_database.customers TO 'querri_readonly'@'%';GRANT SELECT ON your_database.products TO 'querri_readonly'@'%';
FLUSH PRIVILEGES;See Database Best Practices for detailed guidance on creating analytics views and restricting access.
Verify User Permissions
Section titled “Verify User Permissions”-- Show user grantsSHOW GRANTS FOR 'querri_readonly'@'%';Troubleshooting
Section titled “Troubleshooting”Connection Refused
Section titled “Connection Refused”Problem: Can’t connect to MySQL server
Solutions:
- Verify IP
18.189.33.77is whitelisted - Check MySQL is running:
systemctl status mysql - Verify bind-address allows remote connections
- Check firewall rules
- Verify host and port are correct
Access Denied
Section titled “Access Denied”Problem: Access denied for user
Solutions:
- Double-check username and password
- Verify user exists:
SELECT user, host FROM mysql.user; - Check user permissions:
SHOW GRANTS FOR 'username'@'host'; - Ensure user is created with correct host (
%for any host) - Run
FLUSH PRIVILEGES;after grant changes
Unknown Database
Section titled “Unknown Database”Problem: Unknown database error
Solutions:
- Verify database name is correct
- List databases:
SHOW DATABASES; - Ensure user has access to database
- Check for typos in database name
Too Many Connections
Section titled “Too Many Connections”Problem: Too many connections error
Solutions:
- Check current connections:
SHOW PROCESSLIST; - Increase max_connections:
SET GLOBAL max_connections = 200; - Close idle connections
- Optimize connection pooling settings
Security Best Practices
Section titled “Security Best Practices”Use Read-Only Credentials
Section titled “Use Read-Only Credentials”Create dedicated read-only users for analytics to prevent accidental data modification.
Enable SSL
Section titled “Enable SSL”For production databases, enable SSL:
-- Require SSL for userALTER USER 'querri_readonly'@'%' REQUIRE SSL;FLUSH PRIVILEGES;In connector settings:
SSL: EnabledRestrict Host Access
Section titled “Restrict Host Access”Limit user to Querri’s IP:
-- Instead of '%', use specific IPCREATE USER 'querri_readonly'@'18.189.33.77'IDENTIFIED BY 'password';MySQL vs MariaDB
Section titled “MySQL vs MariaDB”The connector works with both. Note these differences:
MySQL 8.0 Features
Section titled “MySQL 8.0 Features”- Window functions
- CTEs (WITH clause)
- JSON functions
- Better optimizer
MariaDB Features
Section titled “MariaDB Features”- Sequence support
- System-versioned tables
- Different JSON implementation
MySQL Versions
Section titled “MySQL Versions”Tested and supported:
- MySQL 8.0.x ✓
- MySQL 5.7.x ✓
- MySQL 5.6.x ✓ (limited support)
- MariaDB 10.11.x ✓
- MariaDB 10.6.x ✓
- MariaDB 10.5.x ✓
- MariaDB 10.4.x ✓
Next Steps
Section titled “Next Steps”- Database Best Practices — Create analytics views and optimize for natural language queries
- Data Connectors Overview — See all available connectors
- Managing Connections — Edit and monitor your connectors