In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
Mariadb1: 192.168.11.247
Mariadb2: 192.168.11.246
1 mariadb1 configuration
Vi / etc/my.cnf.d/server.cnf
[mysqld]
Server-id = 1
Log-bin = master-log
Relay-log = slave-log
Auto_increment_offset = 1
Auto_increment_increment = 2
2 mariadb2 configuration
Vi / etc/my.cnf.d/server.cnf
[mysqld]
Server-id = 2
Log-bin = master-log
Relay-log = slave-log
Auto_increment_offset = 2
Auto_increment_increment = 2
3 restart the mariadb service
Systemctl restart mariadb
4 mariadb1 master, mariadb2 slave configuration
Mariadb1 executes in sql:
MariaDB [(none)] > create user 'lan'@'192.168.11.%' identified by' 666666'
MariaDB [(none)] > grant replication slave on. To 'lan'@'192.168.11.%'
Show master status
Mariadb2 executes in sql:
# the data of log_file and log_pos are the data obtained by show master status on mariad1
Change master to master_host='192.168.11.247', master_user='lan', master_password='666666', master_log_file='master-log.000001', master_log_pos=498
Start slave
Show slave status\ G
5 mariadb2 master, mariadb1 slave configuration
Mariadb2 executes in sql:
MariaDB [(none)] > create user 'lan'@'192.168.11.%' identified by' 666666'
MariaDB [(none)] > grant replication slave on. To 'lan'@'192.168.11.%'
Show master status
Mariadb1 executes in sql:
# the data of log_file and log_pos are the data obtained by show master status on mariad2
Change master to master_host='192.168.11.246', master_user='lan', master_password='666666', master_log_file='master-log.000001', master_log_pos=498
Start slave
Show slave status\ G
At this point, the master and master synchronous replication configuration is complete.
[click]] (https://www.aigony.com/pages/viewpage.action?pageId=1376296)
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.