DeveloperBreeze

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

Continue Reading

Discover more amazing content handpicked just for you

Tutorial

How to Stop SSH From Timing Out

If your SSH session closes after a minute of inactivity, it’s usually caused by idle timeouts. You can fix this with keep-alive settings on both the server and client.

Edit the SSH daemon config:

Aug 21, 2025
Read More
Tutorial

How to Translate URLs in React (2025 Guide)

✅ Translate meta tags using react-helmet or next/head

✅ Enable proper sitemap and routing strategy per locale

May 04, 2025
Read More
Tutorial

Globalization in React (2025 Trends & Best Practices)

e.g., currency symbols, cultural clothing, time formats

  • Color psychology changes per region

May 04, 2025
Read More
Tutorial

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

As businesses go global, your frontend must cater to users from different regions, languages, and cultures. A well-implemented internationalization (i18n) strategy in your React app ensures:

  • Seamless language switching
  • Proper formatting of dates, numbers, and currencies
  • Better accessibility and user retention
  • Improved SEO in multilingual search queries

May 04, 2025
Read More
Tutorial

Building Micro-Frontends with Webpack Module Federation (2025 Guide)

<template>
  <div class="analytics">
    <h2>Real-Time Analytics</h2>
    <p>This component is loaded remotely via Module Federation.</p>
  </div>
</template>

<script>
export default {
  name: 'Analytics',
};
</script>

Now let’s set up the main container app.

May 04, 2025
Read More
Tutorial

State Management Beyond Redux: Using Zustand for Scalable React Apps

Zustand allows you to select specific parts of the state to prevent unnecessary re-renders:

const count = useStore((state) => state.count);

May 03, 2025
Read More
Tutorial

Mastering React Rendering Performance with Memoization and Context

   const increment = useCallback(() => setCount(c => c + 1), []);

Implementing these practices ensures that only components dependent on specific context values re-render when those values change.([Medium][7])

May 03, 2025
Read More
Tutorial

How to Move the MySQL Data Directory to a New Location on Ubuntu 25.04

Check that MySQL is using the new path:

mysql -u root -p -e "SHOW VARIABLES LIKE 'datadir';"

May 01, 2025
Read More
Tutorial

How to Install PHP, MySQL, and phpMyAdmin on Ubuntu 25.04 (LAMP Stack Setup Guide)

sudo apt install php php-cli php-mbstring php-xml php-bcmath php-curl php-mysql php-zip php-gd php-fpm unzip

Verify the PHP installation:

May 01, 2025
Read More
Tutorial

How to Fix NVIDIA Driver Issues on Ubuntu (Dell Vostro 3521)

Run:

sudo ubuntu-drivers devices

Apr 14, 2025
Read More
Tutorial

Avoiding Memory Leaks in C++ Without Smart Pointers

template <typename T>
class ScopedPointer {
private:
    T* ptr;

public:
    explicit ScopedPointer(T* p = nullptr) : ptr(p) {}

    ~ScopedPointer() {
        delete ptr;
    }

    T& operator*() const { return *ptr; }
    T* operator->() const { return ptr; }
    T* get() const { return ptr; }

    void reset(T* p = nullptr) {
        if (ptr != p) {
            delete ptr;
            ptr = p;
        }
    }

    // Prevent copy
    ScopedPointer(const ScopedPointer&) = delete;
    ScopedPointer& operator=(const ScopedPointer&) = delete;
};

For arrays:

Apr 11, 2025
Read More
Tutorial

Deep Copy in C++: How to Avoid Shallow Copy Pitfalls

You must implement all three. This is called the Rule of Three.

class String {
private:
    char* buffer;

public:
    String(const char* str) {
        buffer = new char[strlen(str) + 1];
        strcpy(buffer, str);
    }

    // Copy constructor
    String(const String& other) {
        buffer = new char[strlen(other.buffer) + 1];
        strcpy(buffer, other.buffer);
    }

    // Assignment operator
    String& operator=(const String& other) {
        if (this != &other) {
            delete[] buffer;
            buffer = new char[strlen(other.buffer) + 1];
            strcpy(buffer, other.buffer);
        }
        return *this;
    }

    ~String() {
        delete[] buffer;
    }

    void print() const {
        std::cout << buffer << std::endl;
    }
};

Apr 11, 2025
Read More
Tutorial

🛡️ Protect Your Forms Like a Pro: Anti-Spam Techniques That Actually Work

// web.php
Route::post('/contact', [ContactController::class, 'submit'])->middleware('throttle:3,1');

// ContactController
public function submit(Request $request) {
    if ($request->has('fake_field')) return abort(403); // honeypot
    if (now()->diffInSeconds(session('form_start_time')) < 3) return abort(403); // timing
    // other checks...
}

And in Blade:

Apr 04, 2025
Read More
Tutorial

Build a Custom Rate Limiter in Node.js with Redis

You’re no longer blindly relying on a package—you understand and control the system.

Want to extend this?

Apr 04, 2025
Read More
Tutorial
javascript

Building a Real-Time Object Detection Web App with TensorFlow.js and p5.js

Now that you have a basic real-time object detection app, consider extending its functionality:

  • Filtering Detections: Display only specific classes (e.g., only people or vehicles).
  • Custom UI Elements: Use p5.js to add buttons or controls that modify detection settings in real time.
  • Performance Optimization: Experiment with frame rate adjustments or model parameters for faster detection.

Feb 12, 2025
Read More
Tutorial

Building a Cross-Platform Desktop App with Tauri and Svelte: A Step-by-Step Tutorial

This command creates a src-tauri directory with configuration files and Rust source code. During initialization, Tauri will prompt you for details such as the app name and window settings. Accept the defaults or customize them as needed.

Open the src-tauri/tauri.conf.json file to adjust settings like the application window, bundle identifiers, and security policies. For example, you might configure the window title and size:

Feb 12, 2025
Read More
Tutorial

Implementing a Domain-Specific Language (DSL) with LLVM and C++

#include "DSL/AST.h"
#include <llvm/IR/Constants.h>
#include <llvm/IR/LLVMContext.h>

llvm::Value* NumberExprAST::codegen(llvm::IRBuilder<>& builder) {
    return llvm::ConstantFP::get(builder.getDoubleTy()->getContext(), llvm::APFloat(value));
}

llvm::Value* BinaryExprAST::codegen(llvm::IRBuilder<>& builder) {
    llvm::Value* L = lhs->codegen(builder);
    llvm::Value* R = rhs->codegen(builder);
    if (!L || !R) return nullptr;

    switch (op) {
        case TokenType::Plus:
            return builder.CreateFAdd(L, R, "addtmp");
        case TokenType::Minus:
            return builder.CreateFSub(L, R, "subtmp");
        case TokenType::Asterisk:
            return builder.CreateFMul(L, R, "multmp");
        case TokenType::Slash:
            return builder.CreateFDiv(L, R, "divtmp");
        default:
            return nullptr;
    }
}

Note: We use LLVM’s IRBuilder to simplify the creation of IR instructions. Adjust the code if your LLVM API has evolved by 2025.

Feb 12, 2025
Read More
Tutorial
python

دليل عملي: بناء روبوت دردشة (Chatbot) باستخدام Python و NLP

  • إضافة مزيد من الأسئلة: قم بتوسيع قاعدة البيانات لتشمل المزيد من الردود.
  • استخدام تعلم الآلة: دمج مكتبات مثل TensorFlow أو Rasa لجعل الروبوت أكثر ذكاءً.
  • دعم اللغة العربية بالكامل: استخدام مكتبات مثل farasa لتحليل النصوص العربية بدقة.

هذا النموذج البسيط يمثل بداية رحلتك في تطوير روبوتات الدردشة. يمكنك تخصيصه، تحسينه، أو حتى تحويله إلى مشروع متكامل يخدم المستخدمين في مختلف المجالات.

Dec 12, 2024
Read More
Tutorial
python

كيف تبدأ رحلتك مع الذكاء الاصطناعي: دليل عملي للمبتدئين

  • NumPy لتحليل البيانات.
  • Pandas لإدارة البيانات.
  • Scikit-learn للتعلم الآلي.
  • TensorFlow أو PyTorch للتعلم العميق.

ابدأ بإنشاء مشروع جديد وتثبيت المكتبات اللازمة:

Dec 12, 2024
Read More
Tutorial
dart

دليل شامل: تطوير تطبيقات باستخدام إطار العمل Flutter

ثم قم بتشغيل التطبيق:

flutter run

Dec 12, 2024
Read More

Discussion 0

Please sign in to join the discussion.

No comments yet. Start the discussion!