TL;DR: MySQL user creation, privilege assignment, revocation, and audit checks still depend on repetitive manual steps in self-managed environments, especially across dozens or hundreds of instances, according to StrongDM. The operational lesson is that access governance becomes a scaling problem long before it becomes a database administration problem.
At a glance
What this is: This is a step-by-step MySQL access tutorial, and its key finding is that manual user and privilege management becomes hard to sustain as database estates grow.
Why it matters: It matters because the same access sprawl patterns that burden MySQL admins also show up in NHI, service account, and privileged human access programmes.
👉 Read StrongDM's tutorial on creating MySQL users and managing privileges
Context
MySQL access management is a governance problem as much as a database task. When user creation, privilege changes, password updates, and revocation are handled manually, the real issue is not syntax. It is whether the access model can still be trusted once the environment grows beyond a few instances or a single administrator.
For IAM teams, the pattern is familiar: identity sprawl, privilege drift, and weak auditability all appear when access is granted directly at the resource layer and reviewed only after something breaks. The same control questions apply across NHI credentials, privileged human access, and database accounts, which is why MySQL administration often becomes an IAM design problem in disguise.
Key questions
Q: How should security teams govern MySQL user access across many instances?
A: They should centralise identity, standardise roles, and verify privileges at the database layer rather than relying on ad hoc admin commands. MySQL access becomes unmanageable when each instance is treated differently. A control plane helps, but only if teams still review effective grants, host scope, and account lifecycle across the estate.
Q: What breaks when MySQL privileges are managed manually?
A: Manual privilege management breaks consistency, revocation confidence, and auditability. Teams can create users and grant access, but still miss stale permissions, over-broad host scoping, or accounts that outlive the reason they were created. At scale, the database may enforce a different reality than the one operators believe they have.
Q: When should organisations replace per-instance MySQL administration with centralised access control?
A: They should make the shift when repeated user creation, grant changes, and revocation tasks start consuming operational time across multiple servers. The trigger is not a specific instance count alone. It is the point where local administration no longer guarantees consistent entitlement management or reliable audit evidence.
Q: How do teams know whether MySQL access governance is actually working?
A: They should be able to show current grants, recent revocations, and clear account ownership for every database user. If access cannot be explained from identity source to database entitlement, governance is not working. The strongest signal is that privilege state and operational intent match without manual reconstruction.
Technical breakdown
MySQL users and host-scoped access
MySQL ties a user account to both a username and the host or IP pattern it can use to connect. That means access is not just about who the user is, but where the connection originates from. This matters because a user granted access from localhost is materially different from one granted access from a wildcard subnet. Host scoping is a basic form of access boundary, but it can become brittle when estates are large and host patterns are reused loosely.
Practical implication: define host scoping deliberately and review whether wildcard access has created unintended reach.
Privileges, grant tables, and the GRANT and REVOKE model
MySQL stores privilege state in grant tables and applies permissions through GRANT, REVOKE, and FLUSH PRIVILEGES. In practice, this creates a two-step governance model: change the entitlement, then reload the privilege tables so the system reflects the update. Privileges can exist at global, database, or object level, which gives fine-grained control but also makes misconfiguration easier when teams copy broad grants into new accounts. The model is powerful, but only if privilege scope is explicit and consistently maintained.
Practical implication: audit grant tables and verify that revocations, not just grants, are actually taking effect.
Centralised control planes for database access
The tutorial contrasts direct, per-instance management with a centralised control plane that federates authentication through SSO and exposes role-based access in one place. Technically, that shifts the operational burden away from ad hoc account handling and into a policy layer that can mediate access decisions and logging. The important detail is not automation for its own sake. It is the move from per-database administration to consistent access orchestration across the estate.
Practical implication: prefer a central policy layer when database estates and user populations have outgrown manual per-instance governance.
Breaches seen in the wild
- MongoBleed breach — MongoBleed exposed secrets across 87K MongoDB servers.
- DeepSeek breach — DeepSeek breach exposed 1M+ log lines and sensitive secret keys.
Read our 52 NHI Breaches Analysis report for a comprehensive view of breaches impacting Non-Human Identities including AI Agents.
NHI Mgmt Group analysis
Manual database account administration is an identity governance control, not an engineering convenience. The tutorial shows that the core work is creating users, assigning privileges, revoking access, and checking effective grants. That is the same lifecycle pattern IAM teams manage for service accounts and privileged users. When it is done by hand across many databases, the governance model degrades into local practice rather than enterprise control. Practitioners should treat database access as governed identity, not as a set of isolated SQL commands.
Grant-table governance debt: privilege state in MySQL can exist independently of the day-to-day intent of the administrator. The tutorial’s repeated need to show, grant, revoke, and flush privileges exposes a familiar failure mode: access drift between what teams think is true and what the database still enforces. That is an NHI-style governance problem because the account outlives the operational moment that created it. The implication is that entitlement state needs explicit lifecycle discipline, not just one-time provisioning.
Database access scales the same way NHI sprawl does. The article’s own premise is that dozens or hundreds of instances force admins into repetitive work. That is precisely when role design, central authentication, and revocation discipline stop being optional. The pattern crosses identity domains: database accounts, service accounts, and privileged human accounts all become harder to govern once local exceptions become the operating model. Practitioners should assume that scale turns manual MySQL admin into access sprawl.
Centralised authentication is only half the problem if privilege governance remains local. The tutorial rightly points to SSO integration and a control plane, but the deeper issue is that identity federation does not by itself solve entitlement drift. Access still has to be scoped, reviewed, and removed at the database layer. That means practitioners should evaluate whether their governance model can prove who has access, why they have it, and whether that access still matches current need across all database instances.
From our research:
- 1 in 4 organisations are already investing in dedicated NHI security capabilities, with an additional 60% planning to do so within the next twelve months, according to The State of Non-Human Identity Security.
- From our research: Only 1.5 out of 10 organisations are highly confident in their ability to secure NHIs, compared to nearly 1 in 4 for securing human identities, according to The State of Non-Human Identity Security.
- That confidence gap explains why database access, service accounts, and other machine identities increasingly need the same lifecycle discipline as human access, especially where manual grants still define the control model.
What this signals
Grant-table governance debt is the phrase that best captures what this tutorial reveals about MySQL administration. Access can be created locally, expanded locally, and forgotten locally, which is exactly how identity programmes accumulate hidden entitlement risk across databases, service accounts, and privileged users.
A MySQL estate that still depends on direct host-scoped accounts should be treated as an early warning signal for broader access sprawl. The same pattern usually appears in other non-human identity domains first, then shows up later as audit findings, excess privilege, and weak revocation discipline.
The practical benchmark is whether your programme can prove entitlement state without reconstructing it from multiple servers. If it cannot, the issue is not just database hygiene. It is that identity governance has not yet reached the infrastructure boundary where access is actually enforced.
For practitioners
- Inventory database accounts by host and privilege scope Catalogue every MySQL account, the host patterns attached to it, and the database or object-level privileges it carries. Pay special attention to wildcard host definitions and global grants that quietly widen blast radius.
- Treat privilege revocation as a verified change After every REVOKE or password change, confirm the resulting state with SHOW GRANTS and a direct privilege check. Do not assume the intent of the change matches the state stored in grant tables until you verify it.
- Move recurring MySQL access to federated control Use a central policy layer for authentication and role assignment where database counts are growing. Keep the policy source of truth outside individual instances so access changes can be applied consistently across the estate.
- Review database access on the same cadence as other identities Include MySQL users in periodic entitlement reviews alongside service accounts and privileged human accounts. The objective is to catch stale accounts, inherited privileges, and role creep before they become hidden access paths.
Key takeaways
- MySQL user management is an identity governance problem once teams have to manage many instances, not just a SQL administration task.
- The strongest evidence of scale pressure is the need to repeatedly grant, revoke, inspect, and flush privileges across database estates.
- The control that changes outcomes is centralised access governance with verified privilege state, not isolated per-instance administration.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP Non-Human Identity Top 10 address the attack and risk surface, while NIST CSF 2.0 and NIST Zero Trust (SP 800-207) set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Non-Human Identity Top 10 | NHI-03 | Manual user and secret handling mirrors NHI lifecycle and rotation weaknesses. |
| NIST CSF 2.0 | PR.AC-4 | MySQL grant scoping is a direct access-control and least-privilege issue. |
| NIST Zero Trust (SP 800-207) | PR.AC-1 | Federated access control and continuous verification align with zero-trust access governance. |
Map database accounts to NHI lifecycle controls and verify revoke, rotate, and offboard steps are enforced.
Key terms
- MySQL privilege scope: Privilege scope is the boundary within which a database permission applies. In MySQL, that can be global, database-level, or object-level, which makes access precise but also easy to overextend if teams reuse broad grants without review.
- Grant table: A grant table is the internal MySQL record of who can do what. It stores effective privilege state inside the database, which means administrators must update and verify it carefully when granting or revoking access, especially in estates with many users and hosts.
- Host-scoped account: A host-scoped account is a MySQL user tied to a specific hostname or IP pattern. It limits where the account can connect from, but wildcard patterns can quickly widen access if they are used for convenience instead of explicit governance.
- Centralised access control plane: A centralised access control plane is a policy layer that mediates authentication, roles, and auditing across many systems. For database environments, it reduces per-instance manual work and improves consistency, but it still needs accurate entitlement design underneath it.
Deepen your knowledge
MySQL access governance, privilege scoping, and lifecycle review are core topics in our NHI Foundation Level course, the industry's only accredited NHI security programme. If your database estate still depends on manual grants and local account handling, this course is a useful next step.
This post draws on content published by StrongDM: How to Create a MySQL User (Step-by-Step Tutorial). Read the original.
Published by the NHIMG editorial team on 2025-08-27.
NHI Mgmt Group — the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org