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, choose the tables to load, and ask questions about them in plain language.
Overview
Section titled “Overview”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.
Prerequisites
Section titled “Prerequisites”- A MySQL or MariaDB server Querri can reach
- A database user, ideally read-only (see Database user setup)
Network access
Section titled “Network access”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).
Creating the connector
Section titled “Creating the connector”-
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).
-
Enter connection settings:
Field Default Connector Name MySQL Host * Port 3306 Username * Password Database Optional Require SSL Connection On Connect via VPN (Advanced) Off -
Test the connection. Click Test connection and discover access. This creates the connector, then tests it and lists the databases the user can read.
-
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.
-
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.
-
Load your data. Click Save and Load Data. A progress card shows each table loading, then offers View in Library and Sync daily.
Database user setup
Section titled “Database user setup”Read-only user (recommended)
Section titled “Read-only user (recommended)”-- 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”CREATE 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 analytics views and access.
Verify user permissions
Section titled “Verify user permissions”SHOW GRANTS FOR 'querri_readonly'@'%';Sync scheduling
Section titled “Sync scheduling”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.
Troubleshooting
Section titled “Troubleshooting”Connection refused
Section titled “Connection refused”- Check that your firewall allows Querri’s address, or that the VPN files are loaded.
- Check MySQL is running:
systemctl status mysql - Check that
bind-addressallows remote connections. - Check the host and port.
Access denied
Section titled “Access denied”- Double-check the username and password.
- Check the user exists:
SELECT user, host FROM mysql.user; - Check the user’s grants:
SHOW GRANTS FOR 'username'@'host'; - Make sure the user’s host allows remote access (
%for any host). - Run
FLUSH PRIVILEGES;after changing grants.
Unknown database
Section titled “Unknown database”- Check the database name.
- List databases:
SHOW DATABASES; - Make sure the user has access to it.
Only part of a table loaded
Section titled “Only part of a table loaded”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.
SSL errors
Section titled “SSL errors”If the server doesn’t support SSL, turn off Require SSL Connection. Only do this on a private network.
Security best practices
Section titled “Security best practices”-
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.
Next Steps
Section titled “Next Steps”- Database Best Practices: analytics views and access
- Connecting Databases: the shared database form in detail
- Managing Connections: change and refresh your connectors