Database
MariaDB Connector
Index the tables of a MariaDB database. Same protocol as MySQL, declared as its own source so the label and the origin stay exact.
Prerequisites
- A MariaDB database you can read, version 10.3 or later
- A user with `SELECT` on the tables to index
- The database name, and its host and port if it is not local
Data ingested
When you connect MariaDB, the following content becomes searchable. Every answer that uses it cites it.
| Content | What is kept |
|---|---|
| Tables | Every table and view of the selected database, listed from `information_schema` |
| Rows | Up to 500 rows per table, each row rendered as `column = value` pairs |
| Dates | A `DATE` column stays a date: no invented time is appended |
Setup
Configuration happens in the dashboard, under Integrations. No API call is needed for a normal setup.
Create a read-only user
`CREATE USER 'qm_reader'@'%' IDENTIFIED BY '...'; GRANT SELECT ON mydb.* TO 'qm_reader'@'%';` The connector sets its session to `READ ONLY` and never writes.
Enter the connection
Integrations → Add source → MariaDB: host, port (3306 by default), database and user. Or paste a `mysql://` URL in the **URL** field.
Set the secret
The user password, in the **Secret** field.
Connect and sync
**Test** lists the tables without indexing; **Sync** reads the rows and indexes them.
Configuration options
| Field | Description | Required |
|---|---|---|
| URL or DSN | Full `mysql://user:password@host:port/database`. Takes precedence over the separate fields | No |
| Host | Database host. Defaults to `127.0.0.1` | No |
| Port | Database port. Defaults to `3306` | No |
| Database | Name of the database to index | Yes |
| User | User used to connect | Yes |
| Secret | Password of that user | No |
| Schema | Restrict indexing to one schema. Empty means the database itself | No |
Best practices
- •Pick **MariaDB** rather than **MySQL** when the server is MariaDB: the connection is identical, but the source stays labelled with the software actually running.
- •Only the selected database is read, so a shared server does not pull other applications into the corpus.
- •Grant `SELECT` only on knowledge tables: a `sessions` or `logs` table adds noise and personal data.
Troubleshooting
The password is in the **Secret** field, and the user must be allowed from the host the server sees.
The **Database** field is empty. MariaDB has no default database to fall back on.
The user lacks `SELECT` on it, or it belongs to another database on the same server.
`bind-address` is `127.0.0.1`, or the firewall blocks the port.
Next steps
Once the source is connected and indexed, ask a question from the chat and check that the answer cites this source. A source that never appears in a citation is usually a source with nothing indexed: see Troubleshooting above.
