Ir al contenido

MySQL & MariaDB

Esta página aún no está disponible en español. Se muestra la versión en inglés.

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.

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
  • MySQL or MariaDB database server
  • Database credentials with appropriate permissions
  • Network access to the database

Important: For cloud-hosted databases or databases behind firewalls, whitelist the following IP address:

18.189.33.77

This is Querri’s outbound IP address. Add this to your database firewall rules or security group.

  1. Navigate to Connectors

    • Go to Settings → Connectors
    • Click “Add Connector”
  2. Select MySQL

    • Choose “MySQL” from the database connectors
  3. Configure Connection

Host: your-database-host.com
Port: 3306 (default MySQL port)
Database: your_database_name
Username: your_username
Password: your_password

Optional Settings:

  • SSL: Enable for encrypted connections
  • Charset: Default is utf8mb4
  • Connection Timeout: Default is 30 seconds
  1. Test Connection

    • Click “Test Connection” to verify
    • If successful, click “Save”
  2. Start Analyzing

    • Tables appear in your Library
    • Create a project from any table
    • Ask questions in natural language

Add inbound rule:

Type: MySQL/Aurora
Protocol: TCP
Port: 3306
Source: 18.189.33.77/32
Description: Querri Access

Add firewall rule:

Rule Name: Querri
Start IP: 18.189.33.77
End IP: 18.189.33.77

Add authorized network:

Name: Querri
Network: 18.189.33.77/32

Create a dedicated read-only user for Querri:

-- Create user
CREATE USER 'querri_readonly'@'%'
IDENTIFIED BY 'secure_password_here';
-- Grant read permissions
GRANT SELECT ON your_database.* TO 'querri_readonly'@'%';
-- Apply changes
FLUSH PRIVILEGES;

For tighter security, grant access only to specific tables:

-- Create user
CREATE USER 'querri_readonly'@'%' IDENTIFIED BY 'secure_password_here';
-- Grant access to specific tables only
GRANT 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.

-- Show user grants
SHOW GRANTS FOR 'querri_readonly'@'%';

MySQL data can be kept up to date with scheduled syncs. Go to Settings → Connectors, select your MySQL connector, and open the Schedule tab.

Both full and incremental syncs are supported. For incremental sync, specify a cursor column (e.g., updated_at or created_at) that reliably updates when rows change. Tables without a suitable cursor column will use full sync.

See the Sync Scheduling guide for complete setup instructions.

Problem: Can’t connect to MySQL server

Solutions:

  1. Verify IP 18.189.33.77 is whitelisted
  2. Check MySQL is running: systemctl status mysql
  3. Verify bind-address allows remote connections
  4. Check firewall rules
  5. Verify host and port are correct

Problem: Access denied for user

Solutions:

  1. Double-check username and password
  2. Verify user exists: SELECT user, host FROM mysql.user;
  3. Check user permissions: SHOW GRANTS FOR 'username'@'host';
  4. Ensure user is created with correct host (% for any host)
  5. Run FLUSH PRIVILEGES; after grant changes

Problem: Unknown database error

Solutions:

  1. Verify database name is correct
  2. List databases: SHOW DATABASES;
  3. Ensure user has access to database
  4. Check for typos in database name

Problem: Too many connections error

Solutions:

  1. Check current connections: SHOW PROCESSLIST;
  2. Increase max_connections: SET GLOBAL max_connections = 200;
  3. Close idle connections
  4. Optimize connection pooling settings

Create dedicated read-only users for analytics to prevent accidental data modification.

For production databases, enable SSL:

-- Require SSL for user
ALTER USER 'querri_readonly'@'%' REQUIRE SSL;
FLUSH PRIVILEGES;

In connector settings:

SSL: Enabled

Limit user to Querri’s IP:

-- Instead of '%', use specific IP
CREATE USER 'querri_readonly'@'18.189.33.77'
IDENTIFIED BY 'password';

The connector works with both. Note these differences:

  • Window functions
  • CTEs (WITH clause)
  • JSON functions
  • Better optimizer
  • Sequence support
  • System-versioned tables
  • Different JSON implementation

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 ✓