How do I turn off the mysql password validation?
System Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.
Introduction
MySQL password rules are enforced by either the validate_password plugin or the validate_password component, depending on server version and setup. Disabling validation is possible, but it should be limited to controlled development environments because it weakens account security. In most cases, lowering policy strength is safer than fully turning validation off.
Identify Whether Plugin or Component Is Active
Before making changes, verify what mechanism your server is using. Plugin and component commands are different.
If you see validate_password in SHOW PLUGINS, you are using plugin mode. If you see component_validate_password in mysql.component, you are using component mode.
Do not run uninstall commands until this check is done.
Safer Option: Relax Validation Instead of Disabling
For local development, reducing strictness often solves the immediate issue without removing protection entirely.
This keeps basic controls while allowing simpler temporary credentials.
If your server supports persistent variables, apply with SET PERSIST so changes survive restart.
Disable in Plugin Mode
If full disablement is required in a non-production environment, uninstall the plugin.
After uninstalling, create a test user to verify behavior.
If this still fails, another policy layer may be active, such as external account-management automation.
Disable in Component Mode
For component-based setups, uninstall with component syntax.
Component commands do not work on plugin setups and vice versa, so mode detection is mandatory.
Make Changes Persistent with Configuration Files
Runtime changes can disappear after restart. For stable local environments, set desired behavior in MySQL config.
Use full disablement in config only for isolated test servers. For shared environments, keep validation enabled and tune policy minimally.
Re-Enable Validation Cleanly
Always keep a rollback path ready before disabling security features.
Plugin rollback example:
Component rollback example:
After rollback, test user creation with weak and strong passwords to confirm policy behavior.
Environment Strategy
A practical policy by environment:
- local laptop sandbox:
LOWpolicy acceptable - CI ephemeral database: optionally disabled in isolated network, destroyed after run
- shared staging: enabled with moderate policy
- production: enabled with audited strong policy
This gives developers flexibility while keeping meaningful security controls where risk is real.
Audit and Operational Notes
Disabling validation can violate internal security baselines. Log who changed policy, why, and for how long. If you run infrastructure as code, track MySQL variable and plugin state changes in version control for auditability.
Also check automation scripts that create users. Some scripts assume validation remains enabled and may silently create weaker credentials once disabled.
Common Pitfalls
- Running component uninstall commands on a plugin-based server, which does nothing useful.
- Disabling validation in shared or production environments without risk approval.
- Forgetting persistence behavior, so settings revert after restart unexpectedly.
- Assuming password validation is the only security control and skipping user privilege review.
- Not preparing rollback commands before changing authentication policy.
Summary
- First identify whether
validate_passwordis installed as a plugin or component. - Prefer lowering policy over full disablement when possible.
- Use the correct uninstall command for your mode and verify results.
- Persist only deliberate environment-specific settings.
- Keep rollback and audit trails for any security policy change.
Related reading
- How do I UPDATE a row in a table or INSERT it if it doesn't exist?
- How do I update an entity using spring-data-jpa?
- How do I update elements of a tensor using indices?
- How do I update if exists, insert if not AKA upsert or merge in MySQL?
- How do I use TTL on clickhouse table?
- How do I view the SQL generated by the Entity Framework?
- How do I write LINQ's .Skip1000.Take100 in pure SQL?
- How do I write one to many query in Dapper.Net?

System Design Fundamentals
Build a strong foundation in designing scalable, reliable distributed systems.
View the courseTrack what you have practised
A free account saves your progress, solutions and study plan across every problem on Codemia.
System Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.