MariaDB Connectivity
You set up mariadb connectivity by matching network rules, user accounts, and encrypted transport. The database server then checks client credentials before opening a query session. Most teams start this setup by opening a network port and creating shared roles. When those roles have broad permissions, any user can read or change sensitive tables. Shared passwords also make it hard to see which person ran a bad query. How native mariadb connectivity works A client app starts a session by reac
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 mariadb connectivity by matching network rules, user accounts, and encrypted transport. The database server then checks client credentials before opening a query session. Most teams start this setup by opening a network port and creating shared roles. When those roles have broad permissions, any user can read or change sensitive tables. Shared passwords also make it hard to see which person ran a bad query.
How native mariadb connectivity works
A client app starts a session by reaching the database host over the network. The server listens on a set TCP port for incoming traffic from allowed hosts. Firewalls and cloud security groups act as the first gate for this network path. If the client IP address is not on the allowlist, the network drops the packet.
Once the network path opens, the database engine runs its login check. MariaDB ties each user account to both a username and a specific client host. A user logging in from an office IP might get blocked from a cloud server. The server checks the password or certificate against its internal grant tables.
Teams should also turn on TLS encryption for every client link. TLS stops attackers on the network from reading data as it moves. You load server certificates and tell the database to reject plain text logins. After the login succeeds, the server assigns table and schema roles to that session.
What native network and role settings solve
Native database settings are great at keeping unknown outsiders off your server. Host rules and TLS certificates verify that traffic comes from trusted machines. Database roles also let you split read users from admin users at the table level. You can give an app permission to read orders without letting it drop tables.
Still, native setup only checks who logs in at the start of a session. It does not check what individual queries do while the session is live. If a developer needs to fix one row, they get write privileges for the table. Nothing stops a bad script from updating every row in that table by mistake.
Native roles also struggle with sensitive columns inside shared tables. A support engineer may need to check an order row to fix a bug. If that table holds emails, phone numbers, or card numbers, the query returns everything. You must either build complex views or accept that raw data leaves the database.
Connectivity: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Managing credentials and audit logs across teams
As an engineering team grows, managing database accounts by hand becomes slow and risky. Admins often hand out static passwords that stay valid for months or years. When someone leaves the team, rotating those shared passwords can break running apps. Static keys sitting in local files are also an easy target for attackers.
Native audit logs also lose track of real human identity when teams share accounts. The database log only records the shared role name, such as a generic read user. During a security review, you cannot tell which engineer ran a specific select statement. Teams need a way to link every single query to a real person.
Masking sensitive fields in flight solves the data exposure problem as well. When a tool rewrites matched fields in results, national IDs and card numbers stay safe. Engineers still get the row data they need to debug the app issue.
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
Why does my MariaDB login fail even with the right password?
MariaDB checks both your username and your source host during login. If your current IP address does not match the host rule, the login fails. You also need to check that firewalls allow traffic to the database port.
How do I stop plain text traffic on MariaDB links?
You can load TLS certificates on the server and require secure transport for users. Once set, the server drops any login attempt that does not use TLS encryption. Always give client apps the right CA certificate so they can verify the server.
Can native MariaDB roles hide card numbers in query results?
Standard table roles grant or block read permissions for a whole table or column. If a user has read rights on a column, queries return the raw text. To hide emails or card numbers in results, you need column views or data masking.
Related guides
In this post