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

ما هو حقن التبعيات (Dependency Injection)؟

يمكن تعديل أو استبدال أي تبعية دون تغيير الكائن الرئيسي، مما يجعل الكود أسهل في التطوير على المدى الطويل.

توجد ثلاث طرق رئيسية لحقن التبعيات:

Dec 01, 2025
Read More
Article

أفضل طرق إزالة الصدأ من العدّة والمسامير – دليل شامل منزلي واحترافي

تُعد هذه الطرق مناسبة للعِدّة اليدوية أو القطع الصغيرة التي أصابها صدأ خفيف أو متوسط.

  • انقع الأداة في خل أبيض لمدة 12–24 ساعة.
  • افرك السطح بسلك معدني أو فرشة سلك.
  • اغسلها جيدًا بالماء ثم جفّفها فورًا لمنع عودة الصدأ.

Dec 01, 2025
Read More
Tutorial

How to Stop SSH From Timing Out

sudo systemctl restart sshd

On your local machine, edit or create:

Aug 21, 2025
Read More
Tutorial

How to Translate URLs in React (2025 Guide)

import { useTranslation } from 'react-i18next';

export default function About() {
  const { t } = useTranslation();
  return (
    <div>
      <h1>{t('routes.about')}</h1>
    </div>
  );
}

For full SEO benefits in translated URLs:

May 04, 2025
Read More

Discussion 0

Please sign in to join the discussion.

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