MySQL Replication Error Resolution Guide
Delete Operation Failure on Replica
When a record is deleted on the primary but doesn't exist on the replica, replication halts with an error.
Last_SQL_Error: Could not execute Delete_rows event on table app.users;
Can't find record in 'users',
Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND;
the event's master log mysql-bin.000008, end_lo ...
Posted on Wed, 16 Sep 2026 16:27:41 +0000 by alcapone
MySQL Minor Version Upgrade Procedure
During a recent security scan of backend components, several minor vulnerabilities were detected. To prevent issues during future deployments, I decided to upgrade the MySQL installation. The upgrade strategy involves replacing MySQL binaries only, upgrading the replica node first, promoting it to the primary, and then upgrading the original pr ...
Posted on Wed, 16 Sep 2026 16:19:13 +0000 by Lerris
Archiving Historical MySQL Data with pt-archiver Tool
Background
Starting from December 5th, a production instance began experiancing daily replica lag alerts. After investigation, the TPS during the lag period was not high, with only about 1K DML operations on the clickstream_events table. However, this table had grown to 60GB, far exceeding the recommended maximum single table size of 10GB.
This ...
Posted on Wed, 16 Sep 2026 16:05:06 +0000 by fpyontek
Advanced SQL: Relational Modeling, Joins, and Programmatic Data Operations
Relational Schema Design
When tracking academic performance, a marks table typically requires references to both learners and courses rather than storing redundant textual data.
CREATE TABLE marks (
mark_id INT PRIMARY KEY AUTO_INCREMENT,
pupil_ref INT,
course_ref INT,
mark_value DECIMAL(5,2)
);
The pupil_ref and course_ref col ...
Posted on Tue, 15 Sep 2026 16:47:42 +0000 by Qbasicboy
Practical SQL Techniques and Query Patterns for Common Scenarios
Essential SQL Functions
Field Value Transformation with CASE WHEN
CASE WHEN provides conditional logic similar to if-then statements in programming languages.
Syntax variant 1:
CASE column_name
WHEN 'result1' THEN 'display1'
WHEN 'result2' THEN 'display2'
END AS alias
Syntax variant 2:
CASE
WHEN condition1 THEN result1
WHEN condition ...
Posted on Tue, 15 Sep 2026 16:14:13 +0000 by edwardoka
Advanced MySQL Query Syntax Patterns and Edge Cases
Handling Row Uniqueness
When ensuring unique records, understand that DISTINCT operates on the combined set of selected columns rather than isolated fields. Although GROUP BY is often preferred for performance to avoid full table scans, specific combinations require verification.
SELECT customer_id, region_code FROM regional_sales
GROUP BY cust ...
Posted on Tue, 15 Sep 2026 16:00:48 +0000 by khovorka
Configuring MySQL Master-Slave Replication and Data Synchronization
Initial Data MigrationIf the primary server already contains existing datasets prior to establishing replication, the data must be duplicated to the secondary instance to ensure baseline consistency.Exporting from the Primary HostExecute the following command on the primary Linux machine to generate a complete backup snapshot:mkdir ~/backup_dir ...
Posted on Mon, 14 Sep 2026 16:57:03 +0000 by LuciBKen
MySQL Logs: redo log and bin log Explained
Overview
This article covers the core concepts of MySQL's transaction logs: redo log and bin log, focusing on the InnoDB storage engine. It explains the execution flow, important configuration parameters, and practical operations for viewing, managing, and recovering data using these logs.
1. InnoDB Storage Engine Execution Flow
1.1 Without a T ...
Posted on Mon, 14 Sep 2026 16:55:44 +0000 by josephicon
Essential MySQL Functions for String, Numeric, Date, and Conditional Operations
MySQL functions are predefined code blocks that perform specific operations and return a result. They are categorized into four primary types: string functions, numeric functions, date functions, and conditional (flow control) functions.
String Functions
Commonly used string manipulation functions include:
Function
Description
concat(s1, ...
Posted on Mon, 14 Sep 2026 16:47:21 +0000 by widget
Deploying Java Web Projects on Linux with JDK, Tomcat, and MySQL Setup
JDK Installation and Environment Configuration
Create a target directory for installation packages and transfer the compressed JDK archive into it via the virtual machine's shared folder interface. Verify the upload using:
cd javaCloudJun/software
pwd
ll
Edit the system-wide profile to expose the JDK binaries:
vim /etc/profile
Append these li ...
Posted on Mon, 14 Sep 2026 16:22:12 +0000 by adnanhb