1. Add Maria source vi /etc/yum.repos.d/MariaDB.repo Paste the latest mariadb image from Alibaba Cloud: [mariadb] name = MariaDB baseurl = https://mirrors.aliyun.com/mariadb/yum/10.5/centos7-amd64/ gpgkey=https://mirrors.aliyun.com/mariadb/yum/RPM-GPG-KEY-MariaDB gpgcheck=1 Install the new version of MariaDB yum install mariadb mariadb-server Enable binlog vim /etc/my.cnf.d/server.cnf Add the following under mysqld server_id = 1 log_bin = mysql-bin systemctl restart mariadb 2. Master-Slave Replication 1. Authorize on the master grant replication slave on *.* to 'slave'@'192.168.59.%' identified by '123'; 2. Add a host and perform synchronization master operation Stop slave, stop synchronization, and start modifying information stop slave; Write the master information CHANGE MASTER TO -> MASTER_HOST='192.168.59.143', -> MASTER_USER='slave', -> MASTER_PASSWORD = '123', -> MASTER_PORT=3306, ->MASTER_USE_GTID = current_pos; Start slave and start synchronization start slave; Verify whether show slave status \G; At this point, GTID master-slave replication is completed! ! This is the end of this article about MYSQL database GTID master-slave replication implementation (super convenient). For more relevant MYSQL GTID master-slave replication content, please search 123WORDPRESS.COM's previous articles or continue to browse the following related articles. I hope everyone will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: A complete list of meta tag settings for mobile devices
>>: Detailed explanation of the watch listener example in vue3.0
Let’s not start with the introduction and get str...
<br />Original text: http://andymao.com/andy...
Table of contents Overview Using mapped types to ...
I recently started learning about database knowle...
For containers, the simplest health check is the ...
Configuration Example upstream backend { server b...
The Internet is already saturated with articles o...
Table of contents What is an index The difference...
Database version: mysql> select version(); +--...
Dig Introduction: Dig is a tool that queries DNS ...
Table of contents 1. Core commands 2. Common comm...
Preface Due to the weak typing of JS, loose writi...
Preface When backing up the database, a full data...
You can use the ps command. It can display releva...
This article shares the specific code of JavaScri...