By NHI Mgmt Group Editorial TeamBased on StrongDM: “How to Create a MySQL User (Step-by-Step Tutorial)” (August 27, 2025)

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 MySQL access governance tutorial that shows how manual user creation, grants, revocation, and audit checks become unmanageable across many instances.

Why it matters: It matters because database access management is still identity governance, and MySQL teams that rely on root-level manual administration will struggle to enforce least privilege consistently at scale.


Context

MySQL access governance becomes fragile when every user lifecycle event depends on a sequence of manual commands. In a self-managed environment, admins have to create accounts, grant and revoke privileges, flush privilege tables, and verify grants instance by instance, which turns identity control into repetitive operations work rather than governed access management.

The problem is not simply database administration overhead. As the number of users, hosts, and MySQL instances grows, the real risk is that privilege assignment and revocation drift away from policy, creating inconsistent access and delayed offboarding across the estate.


Key questions

Q: What breaks when MySQL user management stays manual across many instances?

A: Manual MySQL user management breaks when privilege changes depend on repeated human commands across many databases and hosts. Access becomes inconsistent, revocation lags behind policy changes, and audit evidence is fragmented. The result is not just admin friction. It is a governance gap where least privilege cannot be enforced consistently at estate scale.

Q: Why do broad MySQL grants create governance risk in self-managed environments?

A: Broad MySQL grants create risk because they often persist longer than the access need that justified them. When teams combine root-level administration, wildcard host definitions, and manual revocation, privileged access can outlive the task or role it was meant to support. That increases the chance of overexposure and weakens accountability.

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.

Q: Should organisations centralize MySQL permissions management or keep it instance by instance?

A: Organisations should centralize MySQL permissions management when they operate more than a handful of databases or users. Instance-by-instance administration can work for small environments, but it does not scale once multiple hosts, roles, and revocation events have to be coordinated. Centralization improves consistency, auditability, and lifecycle control.


Technical breakdown

MySQL user creation and host scoping

A MySQL account is not just a username. It is a user-host pair, which means the same logical person or workload may need multiple access definitions depending on where it connects from. That design is manageable in a small environment, but it creates policy sprawl when teams rely on wildcards, host-specific rules, and repeated manual account creation across many servers. The control problem is not the syntax itself. It is that every new instance increases the number of places where identity scope must be recreated by hand, and every exception increases the chance of inconsistent access boundaries.

Practical implication: treat host scoping as an access governance issue, not a database convenience function.

Grant, revoke, and flush operations as a lifecycle control

MySQL permissions live in grant tables and are applied through GRANT, REVOKE, and FLUSH PRIVILEGES. That means privilege changes are not inherently continuous. They depend on explicit administrative steps and a reload cycle before changes take effect. In a manual model, that creates a lifecycle gap between policy intent and enforced access, especially when users move roles or leave projects. The longer that gap persists across multiple instances, the more likely an account retains privileges it no longer needs. This is classic lifecycle drift, just expressed through database commands rather than an IAM console.

Practical implication: validate that privilege changes propagate everywhere they should, not just on the instance where the command was run.

Centralized access planes replace repetitive grant review

The tutorial’s core architectural point is that centralized authentication, role-based permission management, and action logging reduce the burden of managing MySQL access one server at a time. In governance terms, a control plane becomes the layer where access intent, privilege assignment, and audit evidence are unified. That matters because manual review of SHOW GRANTS output across many hosts does not scale as a control. It is useful for spot checks, but weak as a continuous governance model. The operational shift is from scattered database administration to a single access workflow that can support consistent provisioning, modification, and revocation.

Practical implication: move recurring user and privilege operations into a centralized workflow that produces consistent audit evidence.


Threat narrative

Attacker objective: The objective is not direct compromise in the article, but the operational outcome of retaining broader or longer-lived access than policy intended.

  1. Entry occurs when admins or application users are created manually on individual MySQL instances, often with host-scoped access that must be specified by hand.
  2. Privilege escalation happens when broad grants, wildcard hosts, or WITH GRANT OPTION are assigned without a consistent governance layer to constrain scope.
  3. Impact is inconsistent least-privilege enforcement, slower revocation, and audit difficulty across multiple databases and servers.

Read and download The State of NHI & AI Agent Breach Report 2026, covering 150+ breaches impacting Non-Human Identities including AI Agents.


NHI Mgmt Group analysis

Manual MySQL access governance is a lifecycle control problem, not a SQL tutorial problem. The article shows that user creation, grants, revocation, and audit checks all require repetitive human action. That makes consistency dependent on process discipline rather than enforced policy, which is exactly where governance breaks down at scale. The practitioner lesson is that access workflows must be treated as governed identity lifecycle events, not ad hoc database administration.

MySQL host scoping creates identity drift when it is managed instance by instance. The same account may need different host definitions, wildcard patterns, and grant combinations across servers, which multiplies the number of places policy can diverge. That turns least privilege into a replication problem, not just a permission problem. The implication is that teams need a control model that standardizes scope instead of recreating it manually everywhere.

Centralized access planes are becoming the practical answer to database privilege sprawl. The article’s strongest signal is that manual SHOW GRANTS review is useful for inspection but weak for governance. A centralized workflow for authentication, role assignment, and logging compresses the gap between policy and enforcement. Practitioners should see this as evidence that database access needs to be managed as part of the broader IAM and IGA lifecycle, not isolated from it.

MySQL privilege management exposes the same control gap that appears across NHI estates: standing access outlives intent. Root-level administration, broad grants, and delayed revocation all reflect an assumption that access changes slowly enough to be handled manually. That assumption fails once databases, users, and environments multiply. The implication is that governance must shift from checking access after the fact to controlling how access is issued and retired in the first place.

Access evidence must be produced by the system, not reconstructed by admins. SHOW GRANTS and grant-table queries are valuable, but they are too manual to serve as the primary governance record in a larger estate. The better pattern is to make access state observable as part of the control plane itself. Practitioners should use this article as a reminder that auditability is a design property, not a monthly task.

What this signals

MySQL access governance becomes an IGA problem as soon as privilege changes must be repeated across many instances. The control failure is not limited to SQL syntax or database administration skill. It is the inability to keep identity state consistent when the same account logic has to be recreated in many places, which is why lifecycle automation matters more than manual inspection.

Privilege drift is the hidden cost of root-level database administration. When admins can create users, grant access, and revoke permissions directly on each server, the governance record fragments quickly. Teams should expect more review effort, more exceptions, and more audit friction until access is managed through a central workflow.


For practitioners

  • Standardize MySQL user lifecycle workflows Define one provisioning path for creating, modifying, and removing database users so privileges are not rebuilt differently on every instance. Tie the workflow to joiner, mover, and leaver events rather than one-off admin requests.
  • Reduce host-by-host privilege drift Replace ad hoc host scoping and wildcard access with a documented pattern for approved connection sources, then review exceptions for each MySQL instance on a fixed cadence.
  • Automate privilege verification Build a repeatable check that compares intended grants with SHOW GRANTS output so over-privileged accounts are identified before they spread across the estate.
  • Centralize audit evidence for database access Store authentication, permission changes, and administrative actions in one logging path so access reviews do not depend on reconstructing state from individual servers.

Key takeaways

  • Manual MySQL access management does not scale cleanly because every user and privilege change has to be repeated across hosts and instances.
  • The strongest control weakness in the tutorial is lifecycle drift, where grants, revocation, and audit checks depend on human consistency instead of enforced policy.
  • Teams that want durable governance need centralized provisioning, consistent host scoping, and verifiable access state across the database estate.

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 addresses the attack and risk surface, while NIST CSF 2.0, CIS Controls v8 and NIST SP 800-53 Rev 5 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Non-Human Identity Top 10NHI-05 — Overprivileged NHIManual MySQL grants and broad privileges map directly to over-privileged non-human database access.
NHI-01 — Improper OffboardingThe article highlights manual revocation delays when users leave or change roles.
Recommendation — Review database accounts for excess privileges and reduce each MySQL identity to the minimum access it actually needs. Tie MySQL user removal to offboarding events so database access is revoked as part of lifecycle closure.
NIST CSF 2.0PR.AA-05 — Access Permissions, Entitlements and AuthorizationsThis article is fundamentally about how access permissions are granted, reviewed, and revoked across databases.
Recommendation — Consolidate MySQL entitlement management so permissions are assigned, reviewed, and removed through a controlled process.
CIS Controls v8CIS-5 — Account ManagementThe tutorial is a direct example of account lifecycle management for database users and admins.
Recommendation — Apply account management discipline to MySQL users so provisioning and deprovisioning follow one governed workflow.
NIST SP 800-53 Rev 5IA-5 — Authenticator ManagementMySQL password and credential handling in the tutorial depends on authenticator lifecycle control.
Recommendation — Manage MySQL credentials under IA-5 so passwords, revocation, and reissue follow formal lifecycle controls.

Key terms

  • MySQL User Host Pair: A MySQL account is defined by both username and source host, not username alone. That means the same logical identity can have different access scopes depending on where it connects from, which makes host definition a governance boundary as well as a technical setting.
  • Privilege Drift: Privilege drift is the gradual gap between the permissions an identity was meant to have and the permissions it actually retains. In AI agent environments, drift grows quickly because roles are reused, tasks change, and lifecycle reviews often lag behind deployment velocity.
  • 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.
  • Centralised access control plane: A centralised access control plane is the control layer that defines, distributes, and enforces access decisions across systems from one place. It typically aggregates policy, identity, and authorization signals, then applies them consistently to applications, infrastructure, and data so administrators can govern permissions, reduce drift, and audit decisions.

Deepen your knowledge

NHI governance, agentic AI identity, and machine identity lifecycle are core topics in our NHI Foundation Level course, the industry's only accredited NHI security programme. If you are building or maturing an IAM programme, it is worth exploring.
NHIMG Editorial Note
Published by the NHIMG editorial team on June 8, 2026.
Updated on October 7, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org