DeveloperBreeze

Sql Programming Tutorials, Guides & Best Practices

Explore 14+ expertly crafted sql tutorials, components, and code examples. Stay productive and build faster with proven implementation strategies and design patterns from DeveloperBreeze.

Tutorial

How to Disable MySQL Password Validation on Ubuntu 25.04

sudo mysql

Run the following command in the MySQL prompt:

May 01, 2025
Read More
Tutorial

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

/mnt/data/mysql/ r,
/mnt/data/mysql/** rwk,

Then reload AppArmor:

May 01, 2025
Read More
Tutorial

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

Add this line to your ~/.bashrc or ~/.zshrc file:

export PATH="$HOME/.config/composer/vendor/bin:$PATH"

May 01, 2025
Read More
Cheatsheet
mysql

MySQL Cheatsheet: Comprehensive Guide with Examples

Introduction

MySQL is a popular open-source relational database management system used by developers and businesses worldwide. It supports a wide range of operations that allow you to create, manage, and manipulate data efficiently. This comprehensive cheatsheet covers essential MySQL commands and concepts, complete with examples presented in HTML tables for easy reference.

Aug 20, 2024
Read More
Tutorial
json mysql

Selecting the Sum of a JSON Property in MySQL

Suppose you want to calculate the total quantity of products ordered by all customers. The quantity is stored within the JSON field order_details. You can extract this value and sum it across all rows using the following query:

SELECT SUM(CAST(JSON_UNQUOTE(JSON_EXTRACT(order_details, '$.quantity')) AS UNSIGNED)) AS total_quantity
FROM orders;

Aug 17, 2024
Read More