Home Database Mysql Tutorial MySQL5.7开启GTID复制模式终于不用开启log_slave_updates参数了

MySQL5.7开启GTID复制模式终于不用开启log_slave_updates参数了

Jun 07, 2016 pm 02:53 PM
gtid l copy turn on model

MySQL5.6的GTID复制模式,必须开启log_slave_updates参数,否则启动就报错,因为需要在binlog找到同步复制的信息(UUID:事务号),如果在密集型写的环境,比如双十一大促在线支付,这无疑增加了从库不必要的磁盘IO开销。 650) this.width=650;" src="http://

MySQL5.6的GTID复制模式,必须开启log_slave_updates参数,否则启动就报错,因为需要在binlog找到同步复制的信息(UUID:事务号),如果在密集型写的环境,比如双十一大促在线支付,这无疑增加了从库不必要的磁盘IO开销。

wKiom1RrBTLyonpmAAF1WPY7xsY589.jpg

(注:开启log_slave_updates参数,是把relay-log里的日志内容再记录到slave本地的binlog里。)


但在MySQL5.7里,官方终于做了调整,用一张gtid_executed系统表记录同步复制的信息(UUID:事务号),这样就可以不用开启log_slave_updates参数,减少了从库的压力。

wKioL1RrDDuhFxJDAAKyEyfsYGI574.jpg


如果你玩过MariaDB10的话,可以看到这块MySQL5.7是参考了MariaDB10的GTID,但MySQL5.7还不能做到普通模式和GTID模式在线切换,如果你想切换为普通模式,必须在my.cnf里,同时在master和slave上注销掉以下参数:

gtid_mode = ON
enforce_gtid_consistency = 1
Copy after login

并且重启mysql进程才生效。在易用性上,MySQL5.7 GTID还是美中不足。


参考:

wKiom1RrD0uzM54bAAEkVpk-UFA809.jpg



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

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks 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)

What does WeChat's Do Not Disturb mode do? What does WeChat's Do Not Disturb mode do? Feb 23, 2024 pm 10:48 PM

What does WeChat Do Not Disturb mode mean? Nowadays, with the popularity of smartphones and the rapid development of mobile Internet, social media platforms have become an indispensable part of people's daily lives. WeChat is one of the most popular social media platforms in China, and almost everyone has a WeChat account. We can communicate with friends, family, and colleagues in real time through WeChat, share moments in our lives, and understand each other’s current situation. However, in this era, we are also inevitably faced with the problems of information overload and privacy leakage, especially for those who need to focus or

How to enable dlss? dlss opening strategy How to enable dlss? dlss opening strategy Mar 13, 2024 pm 07:34 PM

There is a dlss function in NVIDIA. After users turn on dlss, the game frame rate can be greatly improved. Therefore, many friends are asking the editor how to turn on dlss. First, make sure that the graphics card supports dlss and the game supports dlss, then you can enable it in the game. Let’s take a look at the specific tutorials below. Answer: DLSS generally needs to be opened in the game. To enable dlss, you must meet the conditions of the device and game. dlss is the "ray tracing effect", you can enter the game settings. Then go to the "Image or Graphics" settings. Then find "Ray Tracing Lighting" and click to open it. d

Do I need to enable GPU hardware acceleration? Do I need to enable GPU hardware acceleration? Feb 26, 2024 pm 08:45 PM

Is it necessary to enable hardware accelerated GPU? With the continuous development and advancement of technology, GPU (Graphics Processing Unit), as the core component of computer graphics processing, plays a vital role. However, some users may have questions about whether hardware acceleration needs to be turned on. This article will discuss the necessity of hardware acceleration for GPU and the impact of turning on hardware acceleration on computer performance and user experience. First, we need to understand how hardware-accelerated GPUs work. GPU is a specialized

How to copy lyrics from QQ Music How to copy lyrics How to copy lyrics from QQ Music How to copy lyrics Mar 12, 2024 pm 08:22 PM

We users should be able to understand the diversity of some functions when using this platform. We know that the lyrics of some songs are very well written. Sometimes we even listen to it several times and feel that the meaning is very profound. So if we want to understand the meaning of it, we want to copy it directly and use it as copywriting. However, if we want to use it, we still need to You just need to learn how to copy lyrics. I believe that everyone is familiar with these operations, but it is indeed a bit difficult to operate on a mobile phone. So in order to give you a better understanding, today the editor is here to help you. A good explanation of some of the above operating experiences. If you also like it, come and take a look with the editor. Don’t miss it.​

Do Not Disturb Mode Not Working in iPhone: Fix Do Not Disturb Mode Not Working in iPhone: Fix Apr 24, 2024 pm 04:50 PM

Even answering calls in Do Not Disturb mode can be a very annoying experience. As the name suggests, Do Not Disturb mode turns off all incoming call notifications and alerts from emails, messages, etc. You can follow these solution sets to fix it. Fix 1 – Enable Focus Mode Enable focus mode on your phone. Step 1 – Swipe down from the top to access Control Center. Step 2 – Next, enable “Focus Mode” on your phone. Focus Mode enables Do Not Disturb mode on your phone. It won't cause any incoming call alerts to appear on your phone. Fix 2 – Change Focus Mode Settings If there are some issues in the focus mode settings, you should fix them. Step 1 – Open your iPhone settings window. Step 2 – Next, turn on the Focus mode settings

Teach you how to enable dual WeChat functions on your Huawei phone! Teach you how to enable dual WeChat functions on your Huawei phone! Mar 22, 2024 pm 03:15 PM

In modern society, mobile phones have become an indispensable tool in people's lives. The functions of smart phones are becoming more and more powerful, meeting various needs of people's daily life, work and entertainment. For some users who need to use multiple WeChat accounts at the same time, it is particularly important to enable the dual WeChat function. This article will teach you how to enable dual WeChat functions on your Huawei phone, allowing you to easily manage multiple WeChat accounts. First of all, the EMUI system that comes with Huawei mobile phones already supports dual WeChat functions at the system level, so you only need to follow the following steps to set it up.

How to enable real-time traffic conditions on Amap How to enable real-time traffic conditions on Amap Feb 28, 2024 pm 07:22 PM

AMAP map software provides great convenience for users’ travel with its excellent functions. Among them, the real-time traffic function is highly praised by users because it can help users understand road conditions more accurately, avoid congestion, and choose the best route. Then Zian can open the real-time traffic conditions on the Amap map. Users who want to know more about it can follow the editor's tutorial guide below to learn more about it! How to turn on real-time traffic conditions on Amap Map? Answer: [Amap] - [Layer] - [Traffic Conditions]. Specific steps: 1. First open the Amap software and enter the homepage. We can see the notification, layer, and feedback buttons in the upper right corner. Click [Layer] here; 2. Then after clicking, a dialog box will pop up. , here we click [Traffic Conditions]

How to turn on the night mode of 360 Safe Browser How to turn on the night mode of 360 Safe Browser Jan 31, 2024 am 10:27 AM

How to turn on the night mode of 360 Safe Browser? How to turn on the night mode of 360 Browser? Here are the detailed steps! When we use 360 ​​Browser to browse the web, we usually use the day mode. If we use it at night, the light in the day mode is more dazzling. It is very uncomfortable to browse the web at night. So what should we do? Turn on night mode. Here’s how to turn on the night mode of 360 Secure Browser. If you don’t know how, follow me below! How to turn on the night mode of 360 Secure Browser 1. Open 360 Secure Browser. You can see the "Open Menu" icon as shown below in the upper right corner of the browser. Use the mouse to click on the icon. 2. Turn on “Night Mode”

See all articles