In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
The following content mainly brings mariadb master-slave copy analysis to everyone. The knowledge mentioned here is slightly different from books. It is summarized by professional technicians in the process of contacting users. It has certain experience sharing value and hopes to bring help to readers.
Install database client and server:
yum install mariadb mariadb-server -y
Modify the mysql database configuration file (/etc/my.cnf) and add the following two lines under [mysqld]:
log-bin=mysql-bin
server-id=1
Start database services:
systemctl start mariadb
Check if the configuration is in effect:
Log in directly through mysql client:
MariaDB [(none)]> show variables like "%log_bin";
Authorize slave libraries:
grant replication slave on . to "jfedu"@"192.168.75.135" identified by "123456";
flush privileges;
Check master status:
show master status;
Slave configuration:
install mysql yum install mariadb mariadb-server -y
Modify the configuration file (/etc/my.cnf) and add the following line under [mysqld]: server-id=2
Startup Services:
systemctl start mariadb
Specify the master database:
change master to master_host="192.168.75.128", master_user="jfedu", master_password="123456", master_log_file="jfedu- bin.000002", master_log_pos=476;
View slave status:
slave start;
show slave status\G
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
Verify data synchronization:
create database cylin charset=utf8;
View database in slave:
MariaDB [(none)]> show databases;
For the above analysis of mariadb master-slave replication, if you still need to know more, you can continue to pay attention to our industry promotion. If you need to get professional answers, you can contact the pre-sales and after-sales on the official website. I hope this article can bring you some knowledge updates.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.