How to Configure JetBrains AI MariaDB Read Only Access

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up jetbrains ai mariadb read only access by creating a restricted database user. Then you pair that user with your IDE connection profile and enable safe execution rules. Many engineering teams start by connecting their coding assistant to a shared development database. They often reuse an existing admin account to save time during the initial setup. This broad role lets the AI assistant run update or drop statements by mistake. A minor prompt error can wipe out critical test tables or e

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 jetbrains ai mariadb read only access by creating a restricted database user. Then you pair that user with your IDE connection profile and enable safe execution rules. Many engineering teams start by connecting their coding assistant to a shared development database. They often reuse an existing admin account to save time during the initial setup. This broad role lets the AI assistant run update or drop statements by mistake. A minor prompt error can wipe out critical test tables or expose sensitive records.

How jetbrains ai mariadb read only access works in your IDE

Setting up safe database permissions starts inside your MariaDB server before you open the IDE. Database admins create a dedicated role that only holds select permissions on target schemas. This role blocks all write, delete, and table alteration commands at the database engine level. Admins then assign this restricted role to a specific user account made for IDE sessions.

Next, developers add a new MariaDB data source inside their JetBrains IDE database tool window. They enter the host address and log in with the restricted read-only user credentials. The IDE also offers a client-side read-only toggle inside the data source settings panel. Turning on this local setting tells the IDE to block write queries before sending them. Combining the server role with the local IDE toggle creates two layers of defense. The AI assistant uses the database schema metadata to write SQL queries for the user. When the developer runs a suggested query, MariaDB checks the user role and allows only reads.

What native read-only roles solve and what they miss

Native MariaDB roles stop accidental data changes and schema drops from AI-generated SQL statements. If the assistant suggests a delete query, the database engine rejects the command right away. This setup protects data integrity across staging and production systems during daily coding work. It gives developers confidence to test complex join queries generated by their coding assistant.

Still, static read-only permissions only decide who can log in and which tables they read. They do not inspect what individual select statements do while running in flight. A read-only user can still pull thousands of customer emails, phone numbers, or card numbers. When a developer highlights query results for AI help, raw data goes to the model. Native database roles also force teams to share long-lived passwords across many local developer machines. Rotating those static keys takes manual work and interrupts active IDE sessions across the team.

Managing sensitive data and query logs across teams

Security teams need visibility into every query that an AI assistant helps generate and run. Standard MariaDB logs record database queries, but they tie actions to a shared read-only user. Admins cannot tell which individual developer ran a large select query on a sensitive table. Linking every query to a real user identity is vital for clean security audits.

Auditor Read-Only Access + AI Model Access Control: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Teams also need a way to protect personal data inside query results during live sessions. Field masking rewrites matched fields like national IDs or card numbers in the query output. This approach lets developers debug queries with real table structures while keeping private values hidden. Centralizing these rules removes the need to build custom views for every single table.

Inspect every MySQL query and response in flight

Static grants and network rules block bad logins. They cannot pause a risky query for review or mask emails in a result set. By design, hoop.dev is an open-source proxy that runs as a sidecar for your MySQL. It reads plain queries, prepared statements, and cursors on the wire.

First, hoop.dev guardrails block banned actions before MySQL runs them. An AI Analyzer you configure can score intent, and hoop.dev data masking rewrites sensitive string columns in results. Every query and verdict goes to the resource audit trail. Find the open-source binary on GitHub.

Frequently asked questions

Does the JetBrains IDE read-only checkbox replace MariaDB server permissions?

No, the IDE checkbox only blocks write queries on the local client side. You must also enforce select-only permissions on the MariaDB server to stop all write commands.

Can JetBrains AI still suggest schema changes with a read-only database user?

Yes, the AI assistant reads table metadata to suggest any SQL statement you ask for. Still, MariaDB will block the execution if you try to run an alter or drop query.

How do we protect private customer data when using AI for SQL queries?

Database roles grant access to whole tables or views, so select queries return raw values. Using dynamic data masking rewrites emails, phone numbers, and card numbers in query results by default.

Short role checks help teams work fast. Simple rules make each review clear. Good logs keep every team safe. Scoped keys stop bad changes early.

The query runs. The emails stay hidden.