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)؟

وهي الطريقة الأكثر شيوعاً، حيث تُمرَّر التبعيات للكائن عبر المُنشئ.

مثال بسيط بلغة PHP:

Dec 01, 2025
Read More
Article

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

  • ضع طبقة من المسامير داخل الطبق.
  • وصّل القطب السالب بالطبق.
  • ضع قطبًا موجبًا (قطعة حديد) في الجهة المقابلة داخل المحلول.
  • مثالي لـ 100 مسمار في المرة الواحدة.
  • سهل الإعداد ولا يحتاج أدوات إضافية.

Dec 01, 2025
Read More
Tutorial

How to Stop SSH From Timing Out

Host *
    ServerAliveInterval 60
    ServerAliveCountMax 3

This ensures your SSH client pings the server regularly.

Aug 21, 2025
Read More
Tutorial

How to Translate URLs in React (2025 Guide)

import Home from './pages/Home';
import About from './pages/About';

export const routes = (t) => [
  {
    path: `/${t('routes.home')}`,
    element: <Home />,
  },
  {
    path: `/${t('routes.about')}`,
    element: <About />,
  },
];

Update App.js:

May 04, 2025
Read More

Discussion 0

Please sign in to join the discussion.

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