How to Configure JetBrains AI MySQL Read Only Access
You set up jetbrains ai mysql read only access by creating a restricted database user. Then you link that user to the code editor database tool window. Many teams skip this step and use their normal admin accounts instead. Broad permissions let an AI assistant alter tables or delete production rows by mistake. A dedicated read-only user blocks write queries at the database level. How jetbrains ai mysql read only access works in your editor The AI assistant uses the built-in database tool insi
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 mysql read only access by creating a restricted database user. Then you link that user to the code editor database tool window. Many teams skip this step and use their normal admin accounts instead. Broad permissions let an AI assistant alter tables or delete production rows by mistake. A dedicated read-only user blocks write queries at the database level.
How jetbrains ai mysql read only access works in your editor
The AI assistant uses the built-in database tool inside your code editor. It reads your database schema to help write and fix SQL queries. When you link a database, the editor stores the login details on your machine. The AI tool uses this active session to inspect tables, columns, and views. If the session uses an admin account, the AI inherits those full write rights.
To restrict the tool, you first build a new user inside MySQL. You grant this user select permissions on the target database schemas. You must leave out insert, update, delete, and drop privileges. Next, you open the database setup panel inside your editor. You enter the host address and the new read-only login keys. You can also turn on the read-only toggle in the editor connection settings. This local setting warns you before running write commands in the editor. Still, the MySQL user role is what enforces the rule on the server.
What native read-only roles solve and what they miss
Native MySQL read-only roles stop accidental data changes and schema drops. If the AI assistant suggests a delete statement, the database server rejects it. This setup protects data integrity during daily coding and query writing tasks. It gives developers a safe way to generate complex joins and reports.
Still, native database roles only control who logs in and which tables they read. They do not inspect what individual select statements do in flight. A read-only user can still pull thousands of customer rows in one query. When the editor runs that query, raw sensitive data returns to the local machine. That output can include emails, phone numbers, card numbers, or national IDs. This data can also end up in AI prompt context windows.
Auditor Read-Only Access + MySQL Access Governance: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Static database users also create credential sharing problems across the engineering team. Developers must store passwords on their laptops to use the editor tools. If a laptop is lost, you must rotate keys for the whole team. Native roles also lack a clear audit log tied to each developer identity. Everyone using the shared read-only role looks the same in the server logs. Finally, read-only permissions cannot block heavy queries that slow down the database server.
Managing local database credentials and query risk
Teams often try to fix these gaps by creating separate database users per person. This approach helps with audit logs, but it takes hours of manual work. Every time someone joins or leaves the team, admins must update MySQL user tables. Even with individual accounts, select permissions still return unmasked sensitive columns. A developer or AI assistant can still read every column in an allowed table. Real security requires checking queries in flight and masking sensitive fields in 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
Does the editor read-only checkbox replace a MySQL read-only role?
No, the editor checkbox is just a local client guard on your laptop. You must still use a MySQL user with select permissions to block server writes.
Can the AI assistant read table data or just the schema?
The AI assistant reads schema names by default to help write SQL queries. If a developer runs a generated query, the editor fetches the actual row data.
Why is a read-only database user still a privacy risk?
Select permissions allow full access to all columns inside the allowed tables by default. Queries can still return raw emails, phone numbers, card numbers, and national IDs.
Related guides
In this post