How to Configure Windsurf MySQL Approval

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up windsurf mysql approval by turning on user permission prompts for terminal commands and tool calls. This rule forces the coding agent to ask you before it runs any database query. Teams often start by giving the local agent a shared database role to speed up daily work. When that role has broad permissions, one bad prompt can delete tables or expose private rows. How windsurf mysql approval works in the desktop app Cognition renamed Windsurf to Devin Desktop on June 2, 2026. The de

Approval Chains & Escalation + MySQL Access Governance: 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 mysql approval by turning on user permission prompts for terminal commands and tool calls. This rule forces the coding agent to ask you before it runs any database query. Teams often start by giving the local agent a shared database role to speed up daily work. When that role has broad permissions, one bad prompt can delete tables or expose private rows.

How windsurf mysql approval works in the desktop app

Cognition renamed Windsurf to Devin Desktop on June 2, 2026. The desktop app keeps the same core features and uses the Cascade agent to help developers write code. Cascade can run terminal commands on its own when the user gives permission. It opens a dedicated shell that loads your local profile, aliases, and saved keys.

Because the shell loads your local settings, the agent inherits your database keys right away. It can also reach external databases through Model Context Protocol servers that you add to your local setup. When you set up windsurf mysql approval in the app, the check happens on your laptop. The agent drafts a terminal command or tool call and waits for you to click approve.

Developers can also set the agent to run safe commands without asking each time. Many builders use this option so they do not have to click approve all day. Once you click yes, the local shell or tool server sends the query straight to the database.

What local prompts solve and what they miss

Local prompts stop the agent from running surprise commands while you are looking away. They give the developer a chance to read the SQL text before it runs. This setup works well for catching obvious mistakes in a test database on your own machine.

Still, a local click on a laptop is not a real team review. The developer who wrote the prompt is the same person who clicks approve. Tired engineers often click through warnings without reading every line of a long query. Also, the database only checks who logs in at the start of the session.

Approval Chains & Escalation + MySQL Access Governance: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Once the session starts, MySQL trusts every statement that fits that role. It cannot tell if a human or an AI agent typed the drop command. Local prompts also leave no shared log for security teams to check later. And if a table holds emails, phone numbers, card numbers, or national IDs, raw rows return to the agent. To protect shared data, teams need a way to check queries and mask results in flight.

Best practices for safer database roles

Start by creating a separate MySQL role just for your coding agent sessions. Give this role read permissions on the specific tables needed for the current task. Remove permissions to drop tables, change schemas, or alter user grants.

Keep production keys out of your local shell profile so the agent cannot read them. If a shell profile holds live passwords, any command the agent runs can use them. Pair narrow database roles with peer checks for any write action on shared data.

Check MySQL queries and results on the wire

MySQL grants control who logs in. They do not check single queries or mask sensitive columns once a session starts. With hoop.dev, you run an open-source proxy, a sidecar for your MySQL, inline in the MySQL wire protocol. On every query an AI agent or human runs against production MySQL, RDS, or Aurora, hoop.dev decides to pass, mask, block, or hold it for review.

Multi-statement batches and prepared queries are split and checked one by one by hoop.dev guardrails, which refuse banned queries with a native MySQL error or hold risky ones for approval. On the response path, hoop.dev data masking rewrites string values in returned rows in memory, and every decision is logged. See the MIT-licensed project on GitHub.

Frequently asked questions

Is Windsurf now called Devin Desktop?

Yes, Cognition renamed Windsurf to Devin Desktop on June 2, 2026. The app keeps the same editor features and still uses the Cascade agent for tasks.

How does the agent reach a MySQL database?

The agent runs database commands in a dedicated local shell that loads your shell profile. It can also query MySQL through local Model Context Protocol servers that you set up.

Why is a local approval click not enough for live databases?

A local click only asks the user who is already running the agent on that laptop. It does not require a peer check, block raw card numbers in results, or keep a central log.

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.