DeveloperBreeze

How to Disable MySQL Password Validation on Ubuntu 25.04

MySQL 8+ includes a password validation plugin (validate_password) that enforces strong password rules by default. If you're working in a local development environment and want to disable this feature to allow simpler passwords (e.g., password, 123456), follow this safe step-by-step tutorial.


Step 1: Log into MySQL as Root

sudo mysql

Step 2: Uninstall the Password Validation Component

Run the following command in the MySQL prompt:

UNINSTALL COMPONENT 'file://component_validate_password';

If successful, you'll see:

Query OK, 0 rows affected

Step 3: Confirm That Validation Is Disabled

Check that the validation system is gone:

SHOW VARIABLES LIKE 'validate_password%';

If disabled, this will return an empty result set.


Step 4: Create a User with a Simple Password (Test)

Now that validation is disabled, try creating a user with a weak password:

CREATE USER 'devuser'@'localhost' IDENTIFIED BY '123';
GRANT ALL PRIVILEGES ON *.* TO 'devuser'@'localhost';
FLUSH PRIVILEGES;

This should now work without any errors.


↺ Optional: Re-enable Validation Later

If you want to bring back strong password policies:

INSTALL COMPONENT 'file://component_validate_password';

Then you'll need to restart MySQL:

sudo systemctl restart mysql

Related Posts

More content you might like

Tutorial

How to Stop SSH From Timing Out

Add:

Host *
    ServerAliveInterval 60
    ServerAliveCountMax 3

Aug 21, 2025
Read More
Tutorial

How to Translate URLs in React (2025 Guide)

With this setup, your app can:

  • Dynamically switch between translated URLs
  • Support SEO-friendly, localized routing
  • Scale to additional languages easily

May 04, 2025
Read More
Tutorial

Globalization in React (2025 Trends & Best Practices)

const today = new Intl.DateTimeFormat(i18n.language).format(new Date());
new Intl.NumberFormat('en-US', {
  style: 'currency',
  currency: 'USD'
}).format(4999.99);

// Output: $4,999.99

May 04, 2025
Read More
Tutorial

Implementing Internationalization (i18n) in a Large React Application (2025 Guide)

In this tutorial, you'll learn how to implement i18n in a scalable way using i18next, the most popular library for internationalizing React apps.

If you don’t have a project yet, initialize a new one:

May 04, 2025
Read More

Discussion 0

Please sign in to join the discussion.

No comments yet. Be the first to share your thoughts!