Skip to content
Ercan Ermis
Ercan Ermis

notes for everyone about cloud technology

  • Cloud
    • AWS
    • GCP
  • Container
    • Kubernetes
    • Docker
  • Linux
  • DevOps
  • Privacy Policy
  • Contact
Ercan Ermis

notes for everyone about cloud technology

MySQL 8: Understanding and Fixing Error 1819

Ercan, July 14, 2023July 14, 2023

As a beginner in MySQL, you might encounter an error message that reads “ERROR 1819 (HY000): Your password does not satisfy the current policy requirements.” This error is not a bug, but a built-in security feature of MySQL that ensures users set strong passwords. This tutorial will guide you through understanding this error and how to fix it.

What Triggers the Error?

When setting up a password for the MySQL root user, you may be prompted to enable the VALIDATE PASSWORD component. If enabled, this component checks the strength of the password you provide. If your password is considered weak, you’ll encounter the error 1819.

For example, if you try to create a user with a weak password like this:

mysql> create user 'ostechnix'@'localhost' identified by 'mypassword';

You’ll see the error:

ERROR 1819 (HY000): Your password does not satisfy the current policy requirements

This error will persist until you provide a password that meets the current password policy requirements or disable the VALIDATE PASSWORD component.

Understanding Password Validation Policy

MySQL enforces three levels of password validation policy when the VALIDATE PASSWORD plugin is enabled:

  1. LOW: Password must be at least 8 characters long.
  2. MEDIUM: Password must be at least 8 characters long, include numeric, mixed case, and special characters.
  3. STRONG: Password must be at least 8 characters long, include numeric, mixed case, special characters, and dictionary file.

To find the current password policy level, run the following command:

mysql> SHOW VARIABLES LIKE 'validate_password%';

The output will show the currently enforced password level. For instance, if the password level is Medium, your password should be 8 characters long and include a number, mixed case, and special characters.

How to Fix the Error

There are two main ways to fix the error 1819:

1. Change the Password to Meet the Policy

The first method is to set a password that meets the current password validation policy. For instance, if the policy is set to Medium, you could set a password like ‘Password123#@!’ which includes a number, lowercase, uppercase, and special characters.

2. Change the Password Validation Policy

The second method is to change the password validation policy to a lower level. To do this, run the following command from the MySQL prompt:

mysql> SET GLOBAL validate_password.policy=LOW;

Then, check if the password validation policy has been changed to low:

mysql> SHOW VARIABLES LIKE 'validate_password%';

Now, you can create a user with a weak password. To revert back to the MEDIUM level policy, simply run this command:

mysql> SET GLOBAL validate_password.policy=MEDIUM;

If the password policy doesn’t change, exit from the MySQL prompt and restart the MySQL service.

Disabling Password Validation Policy

If you wish to create users with weak passwords, you can disable the Validate Password component altogether and re-enable it back after creating the users. However, it’s not recommended to disable password policy or use weak passwords. Always use a strong password with more than 8 characters including a number, mixed case, and special characters.

Conclusion

In this tutorial, we’ve covered the common MySQL error 1819 and how to fix it. We’ve also discussed how to disable the password policy to allow weak passwords in some cases. However, it’s always recommended to use a strong password for better security. Happy learning!

Share on Social Media
x facebook linkedin reddit
Linux mysqlsecurity

Post navigation

Previous post
Next post
  • AWS (45)
    • Serverless (4)
  • Best (9)
  • DevOps (16)
  • Docker (10)
  • GCP (3)
  • Kubernetes (3)
  • Linux (13)
  • Uncategorized (6)

Recent Posts

  • Automating AWS CloudWatch Log Group Tagging with Python and Boto3
  • Automating AWS ECR Tagging with Python and Boto3
  • Automating ECR Image Cleanup with Bash
  • Update ECR Repositories with Bash Script
  • Why Automated Tests Are Essential in Your CI/CD Pipeline and Development Flow
  • Streamline Your AWS ECR Management with This Powerful Bash Script
  • Setting up DKIM for Google Workspace (Gmail) using Terraform and AWS Route 53
  • Automate AWS Site-to-Site VPN Monitoring
  • Optimizing Docker Images: Tips for Reducing Image Size and Build Time
  • Monitoring EC2 Disk Space with a Simple Bash Script and Slack Alerts
  • Securing Docker Containers: Best Practices for Container Security
  • Mastering Dockerfile: Writing Efficient, Scalable Container Builds
  • Migrating a Git Repository from GitLab to GitHub with GPG-Signed Commits
  • Accessing AWS Services in Private Subnets Without 0.0.0.0/0
  • Understanding AWS Regions, Availability Zones, and VPCs: A Comprehensive Guide
©2025 Ercan Ermis | WordPress Theme by SuperbThemes