How to Configure JetBrains AI MariaDB Prevent Delete

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up a jetbrains ai mariadb prevent delete rule by limiting database user privileges. You also turn on read-only checks inside your code editor before running any queries. Engineering teams often link their AI coding tools straight to live databases for fast work. When those database accounts hold broad write permissions, one bad prompt can wipe out whole tables. How to set up jetbrains ai mariadb prevent delete rules To stop data loss, you must pair database role rules with editor safe

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 a jetbrains ai mariadb prevent delete rule by limiting database user privileges. You also turn on read-only checks inside your code editor before running any queries. Engineering teams often link their AI coding tools straight to live databases for fast work. When those database accounts hold broad write permissions, one bad prompt can wipe out whole tables.

How to set up jetbrains ai mariadb prevent delete rules

To stop data loss, you must pair database role rules with editor safety checks. Start inside your MariaDB server by making a dedicated account for your coding assistant. Grant this user read permissions and insert or update rights only where needed. Do not grant delete or drop rights to this specific MariaDB user account.

Next, open your JetBrains editor and configure the database data source settings. Point the data source to use the new restricted MariaDB user account. You can also turn on read-only mode in the editor data source settings. This local check warns the user before the editor runs any write command. When the AI assistant writes a query, the editor checks the local rule first. Then MariaDB checks the account privileges before it runs the statement on the server.

What native MariaDB roles solve and where gaps remain

Native MariaDB privileges work well to block all delete commands for a set user. If the AI tool tries to remove rows, the database stops the query right away. Editor checks add a helpful warning screen for developers working in the query console.

Still, static database roles create friction during daily work and incident fixes. Developers often need to remove a bad test row or clean up broken data. Because the restricted role blocks all deletes, engineers end up switching to admin accounts. Once an engineer logs in with an admin role, the AI assistant shares that session. Static roles only decide who logs in at the start of a session. They cannot inspect individual queries in flight or ask a teammate for quick approval.

AI Data Exfiltration Prevention: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Why shared database credentials increase risk with AI tools

Many teams still share one main database password across several local code editors. When everyone uses the same high-level login, audit logs lose all personal detail. You can see that an account deleted rows, but not which person or prompt ran it.

AI tools also read schema names and sample rows to build better SQL queries. Without field masking, query results return raw emails, phone numbers, and card numbers to the editor. Static MariaDB privileges cannot rewrite sensitive fields in query results on the fly. Teams need a way to check every single command and mask sensitive results in real time.

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. It runs next to MySQL, RDS, or Aurora and reads the MySQL wire protocol.

Multi-statement batches and prepared queries are split and checked one by one by hoop.dev guardrails. When a rule refuses a query, MySQL returns a native error packet with your message. On the response path, hoop.dev data masking rewrites string values in returned rows that match your rules. Every query and decision is logged per resource. See the MIT-licensed project on GitHub.

Frequently asked questions

Can JetBrains AI delete MariaDB rows on its own?

The assistant writes SQL drafts, and the editor can run them if given write permissions. If the active database connection allows deletes, a bad query can remove live rows.

Is the editor read-only checkbox enough to stop deletes?

No, the editor read-only setting is only a client-side check inside the local app. Any user can uncheck that box in seconds if the database login still allows deletes.

How do we allow safe deletes without full admin roles?

Keep default accounts free of delete rights and require per-query checks for any data removal. You can also mask emails and phone numbers in query results during those sessions.

The query runs. The emails stay hidden.