In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
1. Binlog must be enabled for both master and slave libraries.
two。 The master library and slave library server-id are not the same
3. Establish a master-slave secondary user
Grant replication slave on. To 'rep'@'192.168.200.%' identified by' oldboy'
[mysqld]
Server-id=1
Log-bin=mysql.bin
Binlog_format=row
Gtid_mode=ON
Enforce_gtid_consistency
Log_slave_updates
Relay_log_purge=OFF
Note: the above settings must exist.
Change master to master_host='192.168.200.77'
Master_port=3306
Master_user='rep'
Master_password='oldboy123'
Master_auto_position=1
Start slave
Show slave status\ G
Reset slave all; clears all slave information
Error prompt: prompt warning,A partial dump from a server that has GTIDs on export
[root@bastion-IDC ~] # mysqldump-uroot-p xqsj_db > xqsj_db20160811.sql
Warning: A partial dump from a server that has GTIDs will by default include the GTIDs of all transactions, even those that
Changed suppressed parts of the database. If you don't want to restore GTIDs, pass-- set-gtid-purged=OFF. To make a complete
Dump, pass-all-databases-triggers-routines-events.
After GTID is 5.6, global transaction ID (GTID) is added to strengthen the database's primary and standby consistency, fault recovery, and fault tolerance.
Official: A global transaction identifier (GTID) is a unique identifier created and associated with each transaction committed on the server of origin (master).
So it may be because it is unique in one database, but it is possible to repeat when importing other libraries. So there's a reminder.
You can set it by adding two parameters-- set-gtid-purged=off or-gtid-mode=OFF.
There is a good chance that GTID can be reproduced in the import library instead of the original.
[root@master] # mysqldump-uroot-poldboy-- set-gtid-purged=off-A-B-F > all.sql # so ok!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.