Fading Coder

One Final Commit for the Last Sprint

MySQL Log Management: Binary, Error, and Slow Query Configuration

Error Log Diagnostics The error log tracks server startup, shutdown, and critical runtime failures. Locate the active error log path: SELECT @@GLOBAL.log_error; To modify the destination, update the instance configuration: [mysqld] log_error=/var/log/mysql/instance_error.log Apply changes by restart...

Deploying MySQL 8.0 on Windows Without an Active Internet Connection

Preparation and File Retrieval Obtain the distribution package for the latest stable build from the official archive. Alternatively, transfer a verified installer package from another machine to ensure compatibility with your environment. https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-8.0.39-wi...

InnoDB Multi-Version Concurrency Control: Snapshot Isolation and Undo Log Mechanics

Core Concepts and Scope Multi-Version Concurrency Control (MVCC) enables the InnoDB storage engine to process concurrent read and write operations without explicit row-level locking. By maintaining multiple temporal versions of data records, readers access consistent snapshots while writers modify n...

Understanding InnoDB Lock Conflicts When Multiple Indexes Target the Same Row

The Index-Lock Binding Mechanism in InnoDB InnoDB attaches locks to index entries rather than physical rows directly. While this principle is well-known, the practical implications become less obvious when different transactions operate on the same row through different indexes. This analysis examin...

MySQL Table Constraints: Primary Keys, Auto Increment, Unique Keys, and Foreign Keys

Primary Key The primary key constraint uniquely identifies each record in a table. Values in the primary key column must be non-null and cannot contain duplicates. A table can have only one primary key, but it can be defined on a single column or multiple columns. Single-Column Primary Key Define th...

Deploying MySQL Read/Write Splitting with OneProxy

Environment Setup This laboratory experimetn uses four CentOS 6.6 x86_64 hosts with the following network configuration. All firewall rules and SELinux must be disabled before proceeding. The topology consists of one master MySQL server, two slave servers, and the OneProxy server. This experiment ex...

Configuring Local Web Security Practice Environments

Resolving Database Port Conflicts When running an integrated server environment like PHPStudy (often referred to as XP in local setups) alongside a pre-existing local MySQL installation, a service conflict typically arises because both services attempt to bind to port 3306. To resolve this without s...

MySQL Core Technical Concepts & Common Troubleshooting Scenarios

InnoDB Gap Lock Mechanism Gap locks are index interval locks that address phantom reads, active exclusively in InnoDB’s REPEATABLE READ isolation level. Instead of targeting existing index entries, they block operations on open ranges between index records, excluding the records themselves. For a ta...

Deploying a Multi-Primary and Replica MySQL Architecture via Docker

Network Topology and Port Allocasion Node Role Host IP Mapped Port Primary-A 192.168.153.19 3321 Replica-A 192.168.153.19 3322 Primary-B 192.168.153.19 3323 Replica-B 192.168.153.19 3324 Directory Initialization and Image Retrieval Execute the following shell commands to fetch the database image and...

MySQL Indexing Principles

InnoDB Internals InnoDB Internal Architecture The Data Structure and Algorithm Behind MySQL Indexing B-Trees and B+ Trees Why B+ Trees are Used for Indexing Databases use B+ trees for indexing because: Insertion and deletion operations in a B+ tree occur only on leaf nodes. Each node is the size of...