How to Configure Devin MariaDB Read Only Access

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up devin mariadb read only access by making a restricted database user. Then you give that user select privileges and share the login with the agent. Engineering teams often use this setup so an AI agent can check data. It lets the agent read schema layouts and fix app bugs on its own. If you give the agent broad write roles, a bad query can drop tables. A wrong update statement can also wipe out production rows in seconds. How native devin mariadb read only access works The native da

Your coding agents run with your access.

Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.

You set up devin mariadb read only access by making a restricted database user. Then you give that user select privileges and share the login with the agent. Engineering teams often use this setup so an AI agent can check data. It lets the agent read schema layouts and fix app bugs on its own. If you give the agent broad write roles, a bad query can drop tables. A wrong update statement can also wipe out production rows in seconds.

How native devin mariadb read only access works

The native database setup starts inside your MariaDB server. A database admin creates a dedicated account just for the AI agent. Instead of granting full rights, the admin grants only the select privilege. You can scope this role to the whole database or specific tables. Next, you store the database host, username, and password in the agent workspace. The AI agent uses a standard client driver to log in and run queries.

When the agent needs to check a bug, it opens a database session. MariaDB checks the account privileges before it runs each statement. If the agent sends a select query, the database returns the matching rows. If the agent tries to insert, update, or delete data, MariaDB blocks it. The server also stops the agent from changing schemas or dropping tables. This native role pattern keeps the agent from altering your stored records.

What native roles solve and what they miss

Native MariaDB privileges solve the problem of accidental data changes. You know the AI agent cannot delete rows or change table structures. This makes it safer for an agent to check live app state. It also separates the agent login from human admin accounts in your logs. For basic test databases, a select role is a solid first step.

Still, native database roles only control who logs in and which tables they read. They do not inspect what individual statements do in flight. A read role still lets the agent pull every column in an allowed table by default. If that table holds emails, phone numbers, or card numbers, the agent reads them. The agent then sends those raw values into its model context window. Native roles also cannot stop an agent from running a massive join query. One heavy read query can lock up CPU and slow down production traffic.

Auditor Read-Only Access + Customer Support Access to Production: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Why static agent credentials create operational risk

Giving an AI agent a static database password creates another big gap. You have to put that secret inside the agent workspace settings. Anyone who can access that workspace might find and copy the database login. If you want to revoke access, you must rotate the password by hand. Then you have to update the workspace settings so the agent works again.

Database logs also show limited detail when an agent uses a shared account. You see the database username, not the human who started the agent task. When an audit happens, your team cannot tie a query to a specific ticket. To use AI agents safely on real data, you need controls beyond static roles. You need a way to rewrite sensitive fields like national IDs in query results.

Add wire guardrails and masking beside MySQL

Database grants and TLS setup decide who can reach MySQL. Even so, an open session can run broad updates or read raw personal data from allowed tables. In practice, hoop.dev runs beside the database as a sidecar for your MySQL. It keeps your login setup and drivers as they are while checking queries on the wire.

With hoop.dev MySQL support, guardrails refuse bad queries before they run and return a readable MySQL error. Data masking rewrites matched sensitive values in result rows in memory. Furthermore, hoop.dev holds SOC 2 Type II and generates evidence for GDPR, HIPAA, and PCI DSS programs. Read the docs and source on GitHub.

Frequently asked questions

Can a MariaDB select role hide sensitive columns from Devin?

MariaDB supports column-level grants, but managing them across many tables takes heavy manual work. Even then, the database returns raw text instead of masking emails or card numbers.

What happens if Devin runs a slow query with read only privileges?

A read only role does not stop expensive queries from using up server memory. Unless you set strict resource limits on the account, a bad join can stall production.

How do teams audit which engineer triggered a Devin database query?

Native MariaDB logs only record the static database user that ran the statement. Without external session tracking, you cannot link a query back to the engineer who prompted the agent.

The query runs. The emails stay hidden.