Tools
Safety
- Read-only by default, enforced by MySQL. Every read tool runs inside
START TRANSACTION READ ONLY, so the server refuses a write even from a stored function the query calls. Run Query also refuses before sending anything: comments (--,#,/* */), backslashes, a second statement, and write keywords such asINSERT,UPDATEorSELECT ... INTO OUTFILE. - Limits on every call.
max_execution_timedefaults to 15 s (up to 55 s withtimeout_seconds;max_statement_timeon MariaDB). Results stop at 500 rows (up to 5,000 withmax_rows) and 1 MB, and Danube stops reading from the server at the cap. A cut result hastruncated: true. - Writes are a separate tool. Execute Statement only runs on a connection stored with mode
read_write, and every call returns aconfirm_tokenfirst that the agent must show you and send back. Lock waits are limited to the call’s timeout, so a DDL statement that cannot get its lock fails instead of queueing every other query behind it. - No secrets in results. Passwords, connection strings and keys are removed from every error message and masked in results.
LOAD DATA LOCALis off. - Every call is audited. The audit log records who called, which tool, a SHA-256 of the SQL (never the text), the row count, the duration and the outcome.
Create a read-only user
Connect with a user that can only read. Test Connection warns when the user holds administrative or write privileges.GRANT SELECT, SHOW VIEW line for every database agents should see. Add REQUIRE SSL to the CREATE USER to refuse unencrypted logins. performance_schema is on by default in MySQL 8; on RDS and Aurora it is the performance_schema parameter (a reboot applies it). Without it, Slow Queries answers available: false with these steps and Table Stats leaves out the activity counters.
Connect
Open MySQL in the dashboard’s tool catalog and click Connect, or let the agent callstore_credential. Fill in host, port, database, user, password and SSL mode. Mode stays Read only unless you want Execute Statement to work.
SSL modes: required encrypts without checking the certificate (the default for public hosts), verify_identity also checks the certificate and host name against the system CAs or the CA certificate you paste (RDS and Cloud SQL publish theirs), preferred uses TLS when the server offers it, disabled never does. Storing a CA certificate upgrades required to verify_identity.
How Danube reaches the database depends on where it lives:
- Public endpoint
- Private network, SSH bastion
- Private network, data-plane agent
Managed databases with a public endpoint (RDS or Aurora with public access, Cloud SQL with a public IP, PlanetScale, Azure) connect directly. TLS is required by default. Allow Danube’s egress addresses in the database’s firewall or security group: see Connect your production database safely.
auth_required), the network (connection_error, destination_blocked) or TLS (tls_error).
Example prompts
- “Which tables in the
appdatabase are biggest, and how many rows do they have?” - “Find orders from the last hour with
status = 'payment_failed'and group them by customer.” - “Why is this query slow? Explain it and suggest an index.”
- “Is anything waiting on a lock right now, and which session holds it?”
- “What are the ten statements that examine the most rows?”
