Tag

GTID

1 views collected around this technical thread.

IT Xianyu
IT Xianyu
Apr 19, 2025 · Databases

Step-by-Step Guide to Setting Up MySQL 5.7 Master‑Slave Replication

This tutorial walks through preparing the Linux environment, installing MySQL 5.7, configuring master and slave servers, creating replication users, verifying synchronization, troubleshooting common issues, and applying advanced options such as GTID and semi‑synchronous replication, all with complete command examples.

GTIDLinuxMaster‑Slave
0 likes · 10 min read
Step-by-Step Guide to Setting Up MySQL 5.7 Master‑Slave Replication
Raymond Ops
Raymond Ops
Apr 2, 2025 · Databases

How to Set Up MySQL Master‑Slave Replication (Step‑by‑Step Guide)

This guide walks you through preparing multiple virtual machines, configuring MySQL server IDs, setting up both classic and GTID‑based master‑slave replication, and managing the replication with essential commands, complete with code examples and architecture diagrams.

GTIDMaster‑SlaveMySQL
0 likes · 6 min read
How to Set Up MySQL Master‑Slave Replication (Step‑by‑Step Guide)
Aikesheng Open Source Community
Aikesheng Open Source Community
Dec 2, 2024 · Databases

MySQL Replication Filter Expansion: Adding New Databases with Efficient Backup and Restore

This article explains how to extend an existing MySQL master‑slave replication filter to include additional databases by using a low‑cost backup‑restore workflow, detailing two solution options, the chosen approach, and step‑by‑step commands for stopping replication, backing up, setting GTID points, restoring, and updating filter rules.

BackupGTIDMySQL
0 likes · 9 min read
MySQL Replication Filter Expansion: Adding New Databases with Efficient Backup and Restore
Aikesheng Open Source Community
Aikesheng Open Source Community
Jul 30, 2024 · Databases

Can a MySQL Replica Omit sync_binlog=1? Experiment and Analysis

This article examines whether a MySQL replica can safely omit setting sync_binlog=1, explains the underlying InnoDB and GTID mechanisms, presents an experiment reproducing power‑loss scenarios, and analyzes how different master_auto_position settings affect data consistency and GTID continuity during recovery.

GTIDMySQLReplication
0 likes · 10 min read
Can a MySQL Replica Omit sync_binlog=1? Experiment and Analysis
Aikesheng Open Source Community
Aikesheng Open Source Community
Jul 23, 2024 · Databases

MySQL Replication Failure Caused by MEMORY Table Reset After Master Restart

The article analyzes a MySQL replication error where a MEMORY table is cleared after a master restart, explains why the binlog records only a statement despite row format, and provides step‑by‑step troubleshooting and remediation measures to ensure data consistency.

GTIDMySQLReplication
0 likes · 7 min read
MySQL Replication Failure Caused by MEMORY Table Reset After Master Restart
Aikesheng Open Source Community
Aikesheng Open Source Community
Mar 5, 2024 · Databases

Locating Large Transactions in MySQL Binlog Using GTID and Shell Scripts

This article explains how to identify and extract large MySQL transactions from binary log files by monitoring binlog size, parsing GTID information, and using shell scripts to retrieve transaction details, timestamps, positions, and DML statistics, with optional use of the my2sql tool.

Database TroubleshootingGTIDMySQL
0 likes · 12 min read
Locating Large Transactions in MySQL Binlog Using GTID and Shell Scripts
Aikesheng Open Source Community
Aikesheng Open Source Community
Feb 27, 2024 · Databases

Tagging GTIDs in MySQL 8.3: Format, Usage, and Experiments

This article explains MySQL 8.3’s new ability to tag GTIDs, describes the original and extended GTID formats, demonstrates how to enable and use tagged GTIDs with mysql-shell, and shows how tagged and non-tagged transactions appear in replication logs.

GTIDMySQLReplication
0 likes · 7 min read
Tagging GTIDs in MySQL 8.3: Format, Usage, and Experiments
Aikesheng Open Source Community
Aikesheng Open Source Community
Jan 22, 2024 · Databases

MySQL 8.3 New Features and Removed Functionality

Version 8.3 of MySQL introduces tagged GTID replication, a selectable JSON EXPLAIN format version, enhanced thread‑pool plugin information, changes to binlog transaction dependency tracking and new CMake options, while removing several C API functions, the FLUSH HOSTS statement, and outdated replication flags.

EXPLAINFeature RemovalGTID
0 likes · 6 min read
MySQL 8.3 New Features and Removed Functionality
Aikesheng Open Source Community
Aikesheng Open Source Community
Dec 26, 2023 · Databases

Understanding MySQL 8.0 immediate_commit_timestamp and original_commit_timestamp in Binlog Replication

This article explains the meaning, generation process, and operational impact of the new immediate_commit_timestamp and original_commit_timestamp fields in MySQL 8.0 binlog events, including how they affect replication delay calculations, warning handling, and precise monitoring of transaction commit times.

GTIDMySQLReplication
0 likes · 9 min read
Understanding MySQL 8.0 immediate_commit_timestamp and original_commit_timestamp in Binlog Replication
Aikesheng Open Source Community
Aikesheng Open Source Community
Oct 17, 2023 · Databases

Resolving MySQL GTID Consistency Errors When Using CREATE TABLE ... SELECT

This article explains why a MySQL 5.7.30 upgrade with GTID enabled causes a GTID‑consistency error for CREATE TABLE ... SELECT statements, describes the underlying mechanism, provides a safe two‑step workaround, and notes that MySQL 8.0.21+ now supports atomic DDL for this operation.

CREATE TABLE SELECTGTIDMySQL
0 likes · 5 min read
Resolving MySQL GTID Consistency Errors When Using CREATE TABLE ... SELECT
Efficient Ops
Efficient Ops
Oct 16, 2023 · Databases

Why Master‑Master MySQL Replication Is Risky and How to Avoid Its Pitfalls

This article explains why the dbops tool does not support MySQL master‑master architecture, describes the two common dual‑master patterns, outlines their drawbacks such as role‑confusion, dirty‑data risk, split‑brain, and update loss, and provides practical workarounds and step‑by‑step deployment instructions to safely implement or avoid dual‑master setups.

GTIDHigh AvailabilityMySQL
0 likes · 17 min read
Why Master‑Master MySQL Replication Is Risky and How to Avoid Its Pitfalls
Aikesheng Open Source Community
Aikesheng Open Source Community
Aug 31, 2023 · Databases

Analysis of MySQL GTID Replication Inconsistency and the Role of Auto_Position

This article examines a MySQL 5.7 replication anomaly where a slave reports no errors despite GTID mismatches, demonstrates how to reproduce the issue, explains the underlying cause related to missing Auto_Position=1, and provides remediation steps and source‑code insights.

Auto_PositionGTIDMySQL
0 likes · 10 min read
Analysis of MySQL GTID Replication Inconsistency and the Role of Auto_Position
Aikesheng Open Source Community
Aikesheng Open Source Community
May 31, 2023 · Databases

Deep Dive into MySQL 8.0.33 Two‑Phase Commit: Source‑Code Analysis

This article provides a detailed source‑code walkthrough of MySQL 8.0.33’s two‑phase commit process, explaining the Prepare and Commit stages, internal structures such as binlog queues, GTID generation, redo‑log flushing, sync handling, and the interactions between InnoDB and the binary log.

GTIDInnoDBMySQL
0 likes · 18 min read
Deep Dive into MySQL 8.0.33 Two‑Phase Commit: Source‑Code Analysis
Wukong Talks Architecture
Wukong Talks Architecture
Apr 12, 2023 · Databases

Troubleshooting MySQL Master‑Slave Replication: Relay Log Corruption and GTID Skipping

This article explains a MySQL master‑slave synchronization failure caused by a corrupted relay log, walks through the replication principles, analyzes slave status and GTID differences, and provides step‑by‑step commands to skip the problematic GTID and restore replication.

GTIDMySQLRelay Log
0 likes · 13 min read
Troubleshooting MySQL Master‑Slave Replication: Relay Log Corruption and GTID Skipping
vivo Internet Technology
vivo Internet Technology
Apr 5, 2023 · Databases

Understanding MySQL Replication: Principles, Mechanisms, and Practical Applications

MySQL replication copies data changes from a primary server to one or more replicas using binlog events—supporting statement, row, or mixed formats and GTID positioning—to provide real‑time backup, read‑write separation, high‑availability failover, and integration pipelines via asynchronous, semi‑synchronous, or centralized binlog services.

Data ReliabilityGTIDHigh Availability
0 likes · 30 min read
Understanding MySQL Replication: Principles, Mechanisms, and Practical Applications
Aikesheng Open Source Community
Aikesheng Open Source Community
Mar 7, 2023 · Databases

FLUSH Statements Write to Binlog on read_only MySQL Replicas Causing GTID Inconsistency

The article explains how executing FLUSH commands on MySQL replicas that are in read_only mode can still write to the binary log, generate new GTIDs, and lead to GTID mismatches between primary and replica, especially when tools like ClickHouse issue such statements.

GTIDMySQLReplication
0 likes · 6 min read
FLUSH Statements Write to Binlog on read_only MySQL Replicas Causing GTID Inconsistency
Wukong Talks Architecture
Wukong Talks Architecture
Jan 10, 2023 · Databases

Understanding MySQL GTID and Position‑Based Replication: Issues and Solutions

This article explains the transition from dual‑primary MySQL to a master‑slave read/write split, outlines the pain points of position‑based replication, and demonstrates how GTID simplifies setup, failover, and monitoring of replication lag while ensuring data consistency.

GTIDHigh AvailabilityMySQL
0 likes · 14 min read
Understanding MySQL GTID and Position‑Based Replication: Issues and Solutions
Aikesheng Open Source Community
Aikesheng Open Source Community
Nov 24, 2022 · Databases

Understanding Orchestrator's RegroupReplicasGTID and Candidate Replica Selection in MySQL Failover

This article explains how Orchestrator selects a candidate replica during MySQL master failover, detailing the GetCandidateReplica and RegroupReplicasGTID functions, their sorting logic, promotion rules, GTID-based regrouping, and differences from MHA, while highlighting potential data loss issues and related bugs.

FailoverGTIDMySQL
0 likes · 22 min read
Understanding Orchestrator's RegroupReplicasGTID and Candidate Replica Selection in MySQL Failover
Aikesheng Open Source Community
Aikesheng Open Source Community
Aug 25, 2022 · Databases

Understanding Data Consistency in MySQL Semi‑Synchronous Replication and HA Failover

This article explains the principles of MySQL semi‑synchronous replication, analyzes how data consistency is maintained during high‑availability failover, presents detailed step‑by‑step transaction flow, discusses scenarios causing GTID divergence, and offers testing methods and remediation techniques for DBA practitioners.

DBAGTIDHigh Availability
0 likes · 14 min read
Understanding Data Consistency in MySQL Semi‑Synchronous Replication and HA Failover