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

عندما تعتمد الكائنات على إنشاء التبعيات داخلياً، فإن النظام يصبح مترابطاً بشكل كبير. حقن التبعيات يفصل عملية الإنشاء عن الاستخدام، مما يقلل الترابط ويجعل البنية أكثر تنظيماً.

يسهل حقن التبعيات استبدال العناصر الحقيقية بمحاكاة (Mocks) أثناء الاختبارات، مما يقلل التعقيد ويزيد دقة نتائج الاختبار.

Dec 01, 2025
Read More
Article

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

  • تنظيف متساوٍ لجميع المسامير.
  • معالجة 200–300 مسمار في عملية واحدة.
  • لا حاجة لتوصيل كل مسمار على حدة.
  • مناسبة للكميات الصناعية الصغيرة.
  • ضع طبقة من المسامير داخل الطبق.
  • وصّل القطب السالب بالطبق.
  • ضع قطبًا موجبًا (قطعة حديد) في الجهة المقابلة داخل المحلول.

Dec 01, 2025
Read More
Tutorial

How to Stop SSH From Timing Out

Edit the SSH daemon config:

sudo nano /etc/ssh/sshd_config

Aug 21, 2025
Read More
Tutorial

How to Translate URLs in React (2025 Guide)

Create i18n.js:

import i18n from 'i18next';
import { initReactI18next } from 'react-i18next';
import LanguageDetector from 'i18next-browser-languagedetector';

import en from './locales/en.json';
import fr from './locales/fr.json';

i18n
  .use(LanguageDetector)
  .use(initReactI18next)
  .init({
    resources: { en: { translation: en }, fr: { translation: fr } },
    fallbackLng: 'en',
    interpolation: {
      escapeValue: false,
    },
  });

export default i18n;

May 04, 2025
Read More

Discussion 0

Please sign in to join the discussion.

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