Skip to content

MySQL & MariaDB

Connect Querri to your MySQL or MariaDB database, choose the tables to load, and ask questions about them in plain language.

The MySQL connector (“MySQL and MariaDB databases” in the app) copies the tables you choose into Querri. It connects by host and credentials, and can reach private databases through an OpenVPN tunnel.

  • A MySQL or MariaDB server Querri can reach
  • A database user, ideally read-only (see Database user setup)

If your database only accepts connections from known addresses, allow Querri’s outbound IP address. For a database reachable only over a private network, use Connect via VPN (Advanced).

  1. Open the connector. Click Connect in the app rail and pick MySQL under Connect a data source, or click Connect on MySQL in Settings → Connectors (admins).

  2. Enter connection settings:

    FieldDefault
    Connector NameMySQL
    Host *
    Port3306
    Username *
    Password
    DatabaseOptional
    Require SSL ConnectionOn
    Connect via VPN (Advanced)Off
  3. Test the connection. Click Test connection and discover access. This creates the connector, then tests it and lists the databases the user can read.

  4. Select data. Pick the database you want to load from. MySQL has no schema step. All Tables is on by default; turn it off to choose tables. Add Custom SQL Queries to load a query’s result as its own source.

  5. Check advanced settings. Limit rows per table is on at 100,000 rows for MySQL. Raise or clear it under Advanced Settings if you need every row.

  6. Load your data. Click Save and Load Data. A progress card shows each table loading, then offers View in Library and Sync daily.

-- 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;
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 analytics views and access.

SHOW GRANTS FOR 'querri_readonly'@'%';

The connector’s owner can keep MySQL data up to date on the Schedule tab, with Full Refresh, Incremental, or both. For incremental syncs, use a cursor column such as updated_at that changes whenever a row does. Tables without that column are skipped by the incremental schedule.

Scheduled syncs use credits when they run. See the Sync Scheduling guide.

  1. Check that your firewall allows Querri’s address, or that the VPN files are loaded.
  2. Check MySQL is running: systemctl status mysql
  3. Check that bind-address allows remote connections.
  4. Check the host and port.
  1. Double-check the username and password.
  2. Check the user exists: SELECT user, host FROM mysql.user;
  3. Check the user’s grants: SHOW GRANTS FOR 'username'@'host';
  4. Make sure the user’s host allows remote access (% for any host).
  5. Run FLUSH PRIVILEGES; after changing grants.
  1. Check the database name.
  2. List databases: SHOW DATABASES;
  3. Make sure the user has access to it.

MySQL connectors limit each table to 100,000 rows by default. Open the connector, raise or turn off Limit rows per table under Advanced Settings, and click Save and Load Data.

If the server doesn’t support SSL, turn off Require SSL Connection. Only do this on a private network.

  • Use read-only credentials to prevent accidental changes.

  • Keep SSL on. You can also require it on the MySQL side:

    ALTER USER 'querri_readonly'@'%' REQUIRE SSL;
    FLUSH PRIVILEGES;
  • Restrict the user’s host to the addresses Querri connects from, once you have them.