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 > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Note: if the master mysql has been running for some time, you need to use backup software to restore the data backup to the slave server to ensure that the data from the master and slave servers are consistent, otherwise an error may be reported, and mysql only supports gtid after 5.6. make sure your software supports gpid during installation.
1. Install mysql
Wget-I-c http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm # download yum source for mysql
Yum install mysql57-community-release-el7-10.noarch.rpm-y # install yum source
Yum-y install mysql-community-server-y # yum install mysql
two。 Edit the main profile
[mysqld] I always use the default path of rpm for datadir=/var/lib/mysqlsocket=/var/lib/mysql/mysql.sockbasedir=/usr/local/mysqluser=mysqlport=3306server-id=1gtid-mode=ONenforce-gtid-consistency=ONbinlog_format=rowlog-bin=log-binsymbolic-links=0log-error=/var/log/mysqld.logpid-file=/var/run/mysqld/mysqld.pid, which is required for actual installation.
3. Edit from Fil
[mysqld] datadir=/var/lib/mysqlsocket=/var/lib/mysql/mysql.sockbasedir=/usr/local/mysqluser=mysqlport=3306server-id=2gtid-mode=ONenforce-gtid-consistency=ONbinlog_format=ROWlog-bin=log-binlog_slave_updates=ONskip-slave-start=1symbolic-links=0log-error=/var/log/mysqld.logpid-file=/var/run/mysqld/mysqld.pid
4. Create an account with copy permission and create it on top of the main
Grant replication slave on *. * to 'rep'@'192.168.%.%' identified by' 123456'
5. Configure the connection from the server
Enter mysql configuration
Change master to master_host='192.168.1.32', master_user='rep',master_password='123456',master_port=3306,master_auto_position=1
6. Start synchronization, view
Start slave;# start
Show slave status
Here two yes show that the synchronization is successful.
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.