Home Database Mysql Tutorial MySQL5.6 GTID模式,同步复制报错不能跳过解决方法。

MySQL5.6 GTID模式,同步复制报错不能跳过解决方法。

Jun 07, 2016 pm 05:41 PM
replication master-slave replication

数据库版本:mysqlselectversion();+------------+|version()|+------------+|5.6.10-log|+------------+1row&..

数据库版本:

同步复制信息:

提示主键冲突,由于是测试机,于是我直接跳过,

提示:由于运行在GTID模式,所以不支持sql_slave_skip_counter语法,如果你想跳过,就必须把事务ID设置为空值。

看来只能用这个方法了。

郁闷,直接设置还不行。

查看了手册,香港服务器租用,需要执行reset master才可以(注:在从上执行啊,千万别在主上)。

执行reset slave的目的是清空master.info和relay-log.info,以便后面重新change master to主从复制。

还记得刚才的gtid_purged那个点吗,只需重新设置下一个点即可。

下面是步骤:

呵呵,美国服务器,总算是解决好了,真麻烦啊。如果大家有更好、更方便的解决方法,香港空间,也给我回帖哦,谢谢。

 

本文出自 “贺春旸的技术专栏” 博客,请务必保留此出处

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

Repo: How To Revive Teammates
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to implement master-slave replication of MySQL database in PHP How to implement master-slave replication of MySQL database in PHP May 17, 2023 am 08:18 AM

With the rapid development of the Internet, Web applications are increasingly integrating database operations. MySQL is a world-renowned relational database system that is widely used. In highly concurrent web applications, MySQL master-slave replication is an important way to improve database performance and availability. This article will introduce how to use PHP to implement master-slave replication of MySQL database. 1. What is MySQL master-slave replication? MySQL master-slave replication refers to copying data from one MySQL database server to another server.

Building a Highly Available MySQL Cluster: Best Practice Guide for Master-Slave Replication and Load Balancing Building a Highly Available MySQL Cluster: Best Practice Guide for Master-Slave Replication and Load Balancing Sep 09, 2023 am 10:57 AM

Building a Highly Available MySQL Cluster: Best Practice Guide for Master-Slave Replication and Load Balancing In recent years, with the rapid development of the Internet, the database has become one of the core data storage and processing engines for most web applications. In this scenario, high availability and load balancing have become important considerations in database architecture design. As one of the most popular open source relational databases, MySQL's cluster deployment solution has attracted much attention. This article will introduce how to implement a highly available database cluster through MySQL master-slave replication and load balancing.

Data master-slave replication technology in MySQL Data master-slave replication technology in MySQL Jun 14, 2023 pm 02:10 PM

MySQL database is a very popular relational database management system that supports a variety of data replication technologies, among which the more commonly used is master-slave replication technology. This article will introduce the data master-slave replication technology in MySQL, including principles, implementation methods, common problems and countermeasures. 1. Principle of master-slave replication technology The master-slave replication technology in MySQL can copy the data of a MySQL database to other servers to achieve data backup, load balancing, read-write separation and other functions. Its basic principle is to convert the main database

Detailed explanation of the master-slave replication function of Redis Detailed explanation of the master-slave replication function of Redis May 11, 2023 am 10:00 AM

Redis is an open source memory-based key-value storage system that is commonly used in scenarios such as caching, queuing, and real-time data processing. In large-scale applications, in order to improve the availability and performance of Redis, it is often necessary to adopt a distributed architecture, in which master-slave replication is a commonly used mechanism. This article will introduce the master-slave replication function of Redis, including definition, principle, configuration and application scenarios. 1. Definition of Redis master-slave replication refers to automatically synchronizing the data of one Redis node (i.e. master node) to other nodes (i.e. slave node).

How to implement MySQL synchronized data Replication How to implement MySQL synchronized data Replication May 26, 2023 pm 03:22 PM

MySQL provides the Replication function, which can synchronize data from one database to multiple other databases. The former is usually called the master library, and the latter is called the slave library. The MySQL replication process uses an asynchronous method, but the delay is very small and synchronized in seconds. 1. Basic principles of synchronous data replication 1. Data changes that occur on the main library are recorded to the binary log Binlog 2. The IO thread of the slave library copies the Binlog of the main library to its own relay log Relaylog 3. The SQL thread of the slave library reads , Replay relay log to achieve data replication. MySQL replication has three modes: StatementLevel, RowLevel, Mi

How to configure master-slave replication of MySQL database? How to configure master-slave replication of MySQL database? Jul 13, 2023 pm 10:05 PM

How to configure master-slave replication of MySQL database? Master-slave replication of MySQL database is a common data backup and high availability solution. By configuring master-slave replication, you can synchronize data from one MySQL server (master server) to another (slave server), thereby improving database availability and performance. The following describes how to configure master-slave replication in a MySQL database and provides corresponding code examples. Make sure the MySQL server is installed and started. First, make sure MySQL is installed on your system.

Achieving data redundancy and expansion: application cases of MySQL master-slave replication technology in cluster environments Achieving data redundancy and expansion: application cases of MySQL master-slave replication technology in cluster environments Sep 08, 2023 pm 04:36 PM

Realizing data redundancy and expansion: Application cases of MySQL master-slave replication technology in cluster environments Introduction: With the development of the Internet, the increasing amount of data and the increasing number of users, traditional stand-alone databases can no longer meet the requirements of high concurrency and high availability. need. In this context, distributed databases have become one of the popular solutions. As one of the most commonly used relational databases, MySQL's master-slave replication technology has also received widespread attention in distributed databases. This article will introduce MySQL master-slave replication technology in a cluster environment

Master-slave replication and high availability architecture in MySQL Master-slave replication and high availability architecture in MySQL Sep 09, 2023 pm 12:03 PM

Master-slave replication and high-availability architecture in MySQL As Internet applications and data volumes continue to grow, the high availability and scalability of the database are becoming more and more important. As a widely used open source relational database, MySQL provides master-slave replication and high-availability architecture solutions. Master-slave replication refers to the process of using a MySQL database instance as the master database and replicating its data to one or more slave databases (slave). This replication method can achieve redundant backup of data and separation of reading and writing.

See all articles