Claix dashboard
How to connect my MySQL to Claix
Claix connects to your MySQL database with a dedicated user (claix_agent), tests the connection from the dashboard, and stores credentials securely. With that link you can use Claix Retrieve: Data Map, routes, and read-only agents.
MySQL in Claix is Retrieve only. Claix Ingest stays PostgreSQL. This guide covers requirements, the user SQL, the GRANT SELECT lines, the dashboard form, and what to do after you connect. No public API calls required.
1. Before you start
You need:
- A Claix account with dashboard access (/dashboard).
- A MySQL 8.0 or later server reachable over the internet with TLS (RDS, PlanetScale, DigitalOcean, TiDB, a VPS with a public hostname, and so on). If the server is MariaDB, use the MariaDB guide: Claix rejects a server that does not match the engine you picked.
- Admin rights to create the
claix_agentuser and theGRANTs. - The DNS hostname (never a literal IP), the database name, and a strong password for the user.
In the dashboard, open Database connection (/dashboard/database-connection).
2. Security principles
- Never use root or the admin user with Claix.
- Claix only accepts the username
claix_agent. - Create the user with
REQUIRE SSL. Without TLS, Claix will not connect. SELECTonly, table by table. Do not grantINSERT,UPDATE,DELETE,CREATE,DROP,ALTER,GRANT OPTION, roles, or global privileges (ON *.*).- Grant nothing on
mysql,sys,performance_schema, orinformation_schema. - The host must be a public DNS name. Localhost, raw IPs, and private networks are blocked.
- The password is tested on connect and stored in Vault. It does not stay in the browser or in public dashboard tables.
3. Create the claix_agent user
In your provider’s SQL editor (RDS, MySQL Workbench, the mysql CLI, and so on), run the script. Replace your-strong-password.
CREATE USER 'claix_agent'@'%' IDENTIFIED BY 'your-strong-password' REQUIRE SSL;
The % host lets the user sign in from the internet. If your provider requires another host, use that value, but the username must be exactly claix_agent. This user has no global privileges: the GRANTs are per table.
4. SELECT, table by table
Claix names tables as database.table. Replace your_db and your_table with the real names. The database name may contain only letters, numbers, and _.
GRANT SELECT ON `your_db`.`your_table` TO 'claix_agent'@'%';
Repeat the line for every table Retrieve should query. After you connect, tick the tables in the dashboard and Claix generates this SQL for you: copy it and run it on your database.
MySQL has no RLS policies. The GRANT is the limit: without it, Claix connects but cannot see that table.
5. Network, port, and TLS
| Field | What to enter |
|---|---|
| Host | Public DNS hostname (for example the RDS endpoint). No IP or localhost. |
| Port | 3306, 3307, 3308, 4000 (TiDB), or 25060 (DigitalOcean) |
| Database | Exact database name. Letters, numbers, and _ only. |
| Username | Always claix_agent (the field is fixed) |
| Password | The user password you created, not the admin one |
| SSL | require (recommended: encrypts and accepts public CAs plus Amazon RDS) or verify-full (paste your CA PEM when the certificate is private) |
Open the firewall or security group so the port accepts TLS from the internet. A self-signed certificate does not pass with require: use verify-full and paste the CA.
6. Connect from the dashboard (step by step)
- Go to /dashboard and sign in.
- In the sidebar, open Database connection.
- Choose the MySQL engine (Retrieve only).
- Copy the SQL that creates
claix_agent, change the password, and run it on your MySQL. - Fill in the connection name, host, port, database, and the
claix_agentpassword. The username cannot be changed. - Pick SSL. With verify-full, paste the full CA certificate (including the
BEGIN CERTIFICATE/END CERTIFICATElines). - Click Test and save. Claix checks that the server is MySQL, reads
SHOW GRANTS, and stores the password in Vault. - With the connection active, tick the tables and run the
GRANT SELECTthe dashboard generates. Then click Reload schema.
If it fails, the dashboard message points to an unreachable host, SSL, a username other than claix_agent, a version older than 8.0, a MariaDB server, or an extra privilege (writes, global, or GRANT OPTION).
7. After you connect
With the database linked you can:
- Retrieve: build the Data Map, routes, and agents in the Retrieve menu, then try them in the Sandbox. Every query runs in a read-only transaction with a time limit.
- Check visible tables: if the list is empty, run the
GRANT SELECTand reload the schema.
Ingest does not use this connection. To write rows, connect a PostgreSQL database. To disconnect, use the action on the same page (it asks you to type disconnect). Agents that depend on this connection stop until you connect again.
8. Quick checklist
- MySQL 8.0 or later, with TLS, and a
claix_agentuser created withREQUIRE SSL. - No global, write, system, or
GRANT OPTIONprivileges. GRANT SELECTon every table Retrieve should read.- Public DNS host, allowed port, SSL enabled.
- Dashboard form set to MySQL, with the
claix_agentpassword. - “Test and save” succeeds and the schema is reloaded.
9. Frequently asked questions
Can I use Amazon RDS? Yes. Use the endpoint (the hostname, not the IP), port 3306, the database you created, and SSL require. The security group must accept the port from the internet.
Why don’t I see tables? The GRANT SELECT on those tables is missing, or you have not clicked Reload schema after granting it.
Is the password stored in the browser? No. It is only sent when testing the connection and stored in Vault on the backend.
Can I connect several databases at once? The dashboard shows the workspace’s active connection. Disconnect before pointing at another instance. Ingest only loads the PostgreSQL connection.
The dashboard says the server is MariaDB. Pick the MariaDB engine and try again. Claix does not treat MariaDB as MySQL.
Does Retrieve need INSERT? No. Only SELECT. Ingest, which does write, is PostgreSQL.