How to Configure Windsurf MariaDB Read Only Access

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up windsurf mariadb read only access by making a restricted database role. Then you point the coding agent to that user account. Cognition rebranded Windsurf to Devin Desktop on June 2, 2026. It keeps the same IDE and features. Teams often let the agent use local shell profiles to query databases. Broad permissions let an AI assistant alter rows or drop tables by mistake. How windsurf mariadb read only access works in practice In Devin Desktop, the Cascade agent runs terminal commands

Auditor Read-Only Access + Customer Support Access to Production: the complete guide

Architecture patterns, implementation strategies, and security best practices. Delivered to your inbox.

Free white paper. No spam. Unsubscribe anytime.

You set up windsurf mariadb read only access by making a restricted database role. Then you point the coding agent to that user account. Cognition rebranded Windsurf to Devin Desktop on June 2, 2026. It keeps the same IDE and features. Teams often let the agent use local shell profiles to query databases. Broad permissions let an AI assistant alter rows or drop tables by mistake.

How windsurf mariadb read only access works in practice

In Devin Desktop, the Cascade agent runs terminal commands with user permission. It uses a dedicated shell that loads your local profile on macOS or Linux. That means the agent can read your shell aliases and stored database keys. The agent can also reach local database tools through the Model Context Protocol. To restrict the agent, database admins create a dedicated MariaDB user account. They grant this user only the select privilege on specific database schemas. Next, the developer stores those restricted login keys in the local shell profile. When the agent runs a query, MariaDB checks the account privileges first. If the agent tries to insert, update, or delete data, MariaDB blocks it. This setup stops the AI tool from making direct changes to your tables.

What native MariaDB roles solve and what they miss

A read only role stops accidental writes, schema drops, and table edits. It enforces a hard boundary on what the database account can change. Still, native database roles only check who logs in and what command type runs. They do not inspect the content of individual queries in flight. A read only user can still run a huge join that locks up CPU. It can also pull entire tables full of sensitive customer data. If the agent reads production rows, sensitive fields enter the model prompt. This exposes emails, phone numbers, card numbers, and national IDs to external models. Also, every developer needs the raw database password stored on their laptop. Rotating those shared keys across a whole team takes a lot of manual work. Finally, database logs only show the shared read only account name. You cannot tell which engineer or agent session ran a specific query.

Why local agent permissions need query level controls

Relying on user prompts in the IDE does not fix data exposure. Developers often approve terminal commands fast when they are busy fixing bugs. Once a query runs, the raw output goes straight into the agent context. To protect production data, teams need controls that work on each query. Masking rules can rewrite matched fields like emails or card numbers in results. Statement rules can block heavy queries before they slow down the database. Identity logs can tie every single query back to the exact developer. This keeps the database fast and protects private fields during AI sessions.

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.

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 sits inline in the wire protocol beside the database as a sidecar for your MySQL. On every production query an agent or engineer sends, hoop.dev decides to pass, mask, block, or escalate it for human review.

With hoop.dev MySQL support, guardrails refuse bad queries before they run or hold risky calls for approval, while 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

How does Windsurf connect to a MariaDB database?

Windsurf, now called Devin Desktop, runs database queries through its dedicated terminal or MCP tools. It uses the login keys and aliases stored in your local shell profile.

Does a MariaDB read only role hide sensitive customer data?

No, a read only role still allows full select queries on allowed tables. Any emails, phone numbers, or card numbers in those tables return in plain text.

Can a read only AI agent still harm a production MariaDB server?

Yes, an agent can run unindexed queries or huge table scans. Even without write access, bad read queries can max out memory and slow down production.

Save the open-source gateway.

hoop is MIT-licensed infrastructure for controlling how AI agents reach production data. Star hoophq/hoop so you can inspect it, deploy it, or share it when your team starts governing agent access.