In addition to Weibo, there is also WeChat
Please pay attention

WeChat public account
Shulou
2025-11-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
For small databases, we can directly use the mysqldump full library export import to create a slave library.
Test environment:
CentOS6.8 x86_64
MySQL5.6.34 Community rpm Edition
Main library: node0 192.168.2.10
Slave library: node1 192.168.2.11
5.6.The parameters required for GTID replication (these three lines of parameters should be added for both master and slave libraries):
Gtid-mode=ON
Enforce_gtid_consistency = ON
Log_slave_updates=ON
Step1, export in the main library and scp transfer to node1:
Mysqldump-uroot-pwww.Mwbyd91@-A-Q-- single-transaction-- master-data=2 > / root/all.sql
Scp / root/all.sql node1:/root/
Step2, restore on node1:
Node1 newly installed does not have a password, execute mysql to log in
Source / root/all.sql
"step3, start replication on node1:"
CHANGE MASTER TO MASTER_HOST='192.168.2.10'
MASTER_USER='rpl'
MASTER_PASSWORD='rpl'
MASTER_PORT=3306
MASTER_AUTO_POSITION=1
Start slave
Show slave status\ G
# description:
Importing mysqldump in this way does not require operations like set global gtid_purged='xxxxx'; to be performed by innobackup. Because there are automatic settings in the sql exported by mysqldump. For example, the following figure is a partial screenshot of the exported all.sql:
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.