MySQL Connection Control Plugin
The mysql connection control plugin slows down repeated failed login attempts to your database. It adds a short wait time after a user enters a bad password. Attackers often try to guess passwords by running fast scripts against a server. This native extension stops those fast scripts by forcing the client to wait. Each new mistake increases the wait time before the server checks the next attempt. Legitimate apps and engineers who type the right key log in right away. How the mysql connection
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.
The mysql connection control plugin slows down repeated failed login attempts to your database. It adds a short wait time after a user enters a bad password.
Attackers often try to guess passwords by running fast scripts against a server. This native extension stops those fast scripts by forcing the client to wait. Each new mistake increases the wait time before the server checks the next attempt. Legitimate apps and engineers who type the right key log in right away.
How the mysql connection control plugin works in practice
When a user or AI agent tries to log in, the server checks the password. The extension watches every login event and counts failed attempts for each account. You set a threshold for how many mistakes an account can make. While failed attempts stay below that threshold, the server adds no delay at all.
Once an account passes that limit, the server makes the client wait before responding. Each extra bad attempt makes that wait time grow longer up to a ceiling. As soon as one good login happens, the counter resets back to zero. The plugin also ships with a companion view that shows current failure counts. Database admins read this view to spot accounts that face brute force attacks.
AI agents and scripts sometimes fail to log in when a secret expires. If a bot retries in a tight loop, the extension slows those retries down. This protects the database host from wasting CPU cycles on broken client scripts. Still, if many scripts share one database user, one bad script slows everyone down.
Security tradeoffs of login delays and static database roles
Slowing down bad logins stops brute force attacks at the front door. Yet it does nothing after a user or agent logs in with valid keys. Most teams still share static database passwords across engineers, apps, and automated tools. When a developer already has the right password, login delays never trigger.
Native database roles also leave wide gaps during an active work session. A role might let an engineer read a whole table to fix one bug. When that engineer runs a broad query, the server returns all column in plain text. Sensitive fields like emails, phone numbers, card numbers, and national IDs appear in full.
MySQL Access Governance + Connection Pooling Security: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Shared database accounts also make it hard to track who ran a specific query. The database log only records the shared role name, not the real person. If an engineer or AI agent runs a risky drop command, nobody approves it first. Login controls also cannot stop someone from keeping a static password on a laptop.
How to protect live database sessions beyond login checks
To close these gaps, teams put a control layer in front of the database. Engineers and agents log in with their own work identity instead of shared passwords. The proxy layer checks their identity and maps it to the right database role. This setup removes the need to hand out static database keys to people.
Once the session starts, the control layer inspects queries and results in flight. Data masking rules rewrite sensitive fields like emails and card numbers in query results. If someone runs a dangerous update, the system can pause and ask a peer. Every query ties back to a specific user identity in a central audit log.
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
Does the mysql connection control plugin block an IP address forever?
No, it only adds a wait delay after too many failed login attempts. Once a user enters the right password, the delay counter resets right away.
Can one broken script slow down logins for other team members?
Yes, if your team and scripts share the same database user account. A broken script triggers delays for everyone who uses that same account name.
Does the plugin hide sensitive data after a user logs in?
No, the plugin only watches the login step and does not check queries. You need data masking in your access layer to rewrite card numbers or emails.
Related guides
In this post