MySQL has a master and a slave database
- Database server 192.168.4.51 Configure the active database server
- Database server 192.168.4.52 Is configured as the secondary database server
- Client 192.168.4.50 Tests the configuration
192.168.4.51 is the primary server, and 192.168.4.52 is the secondary server. The binlog logs on the primary server are retrieved and the corresponding libraries and tables are redone locally to synchronize data with the primary server. [Obtaining resources]
Hosts 51 and 52 run the MySQL database service respectively, and the administrator root can log in to the host. Host 50 as a client only needs to have the command line connection to the mysql command. [Obtaining resources]
Step 1: Configure the primary server 192.168.4.51
1) Enable binlog
1]# mysqld 2 [mysqld] 4 log-bin=master51 // mysqld 6]# systemctl restart mysqldCopy the code
2) User authorization
You can customize the user name, use % for the client address, or specify only the address of the secondary server.
Mysql > grant replication slave on *.* to repluser@"%" identified by "123qqq... A"; 3 mysql>quit;Copy the code
3) View the binlog information
View the log file name and offset location.
mysql> show master status\G; * * * * * * * * * * * * * * * * * * * * * * * * * * * 1 \. Row * * * * * * * * * * * * * * * * * * * * * * * * * * * File: master51.000001 / / log of the Position: 441 // Offset Binlog_Do_DB: Binlog_Ignore_DB: Executed_Gtid_Set: 1 row in set (0.00 SEC)Copy the code
Step 2: Configure the secondary server 192.168.4.52
1) Specify server_id
The Server_id value can be customized but cannot be the same as that of the primary server.
CNF 2 [mysqld] 3 [mysqld] 4 :wq 5]# systemctl restart mysqld //Copy the code
2) Ensure data consistency with the primary server (this operation can be ignored if you are using two newly deployed database servers to configure master/slave synchronization)
2]# SCP /allbak.sql [email protected]:/root/ Mysql > create database; Mysql > create database on secondary server with same name as primary server 4]# mysql > create database on secondary server with same name as primary server 4]# mysql > create database on secondary server with same name as primary server 4]# mysql > create database on secondary server with same name as primary server 4]# mysql > create database on secondary server with same name as primary server 5]# vim /root/allbak.sql // View the binlog information in the backup file on the secondary server. 6...... 7... 8 CHANGE MASTER TO MASTER_LOG_FILE='master51.000001', MASTER_LOG_POS=441; // Log name and offsetCopy the code
3) Specify primary server information
The database administrator root logs on to the local server and specifies the primary server information, where the log file name and offset are recorded in the allbak.sql file.
2]# mysql> show slave status; // Check the status information. 3 Empty set (0.00 SEC) 4 mysql> change master to // set master_host= "192.168.4.51", // Master server IP address 6 -> master_user= "repluser", // Master server authorized user 7 -> master_password= "123qQQ... A ",// Master server authorization user password 8 -> master_log_file= "master51-bin.000001",// Master server log file 9 -> master_log_pos=441; Mysql > start slave; 11 mysql> show slave status\G; / / view state information 12 * * * * * * * * * * * * * * * * * * * * * * * * * * * 1 \. Row * * * * * * * * * * * * * * * * * * * * * * * * * * * 13 Slave_IO_State: Waiting for Master to send event 14 Master_Host: 192.168.4.51 // IP address of the primary server 15 Master_User: repluser 16 Master_Port: 3306 17 Connect_Retry: 60 18 Master_Log_File: master51.000001 19 Read_Master_Log_Pos: 437 20 Relay_Log_File: Host52relay-bin.000002 21 Relay_Log_Pos: 604 22 Relay_Master_Log_File: master51.000001 23 Slave_IO_Running: Yes //IO thread Yes status 24 Slave_SQL_Running: Yes //SQL thread Yes status 25 Replicate_Do_DB: 26 Replicate_Ignore_DB: 27 Replicate_Do_Table: 28 Replicate_Ignore_Table: 29 Replicate_Wild_Do_Table: 30 Replicate_Wild_Ignore_Table: 31 Last_Errno: 0 32 Last_Error: 33 Skip_Counter: 0 34 Exec_Master_Log_Pos: 437 35 Relay_Log_Space: 812 36 Until_Condition: None 37 Until_Log_File: 38 Until_Log_Pos: 0 39 Master_SSL_Allowed: No 40 Master_SSL_CA_File: 41 Master_SSL_CA_Path: 42 Master_SSL_Cert: 43 Master_SSL_Cipher: 44 Master_SSL_Key: 45 Seconds_Behind_Master: 0 46 Master_SSL_Verify_Server_Cert: No 47 Last_IO_Errno: 0 48 Last_IO_Error: 49 Last_SQL_Errno: 0 50 Last_SQL_Error: 51 Replicate_Ignore_Server_Ids: 52 Master_Server_Id: 50 53 Master_UUID: 4881ee4b-8800-11e9-830a-525400001e32 54 Master_Info_File: /var/lib/mysql/master.info 55 SQL_Delay: 0 56 SQL_Remaining_Delay: NULL 57 Slave_SQL_Running_State: Slave has read all relay log; waiting for more updates 58 Master_Retry_Count: 86400 59 Master_Bind: 60 Last_IO_Error_Timestamp: 61 Last_SQL_Error_Timestamp: 62 Master_SSL_Crl: 63 Master_SSL_Crlpath: 64 Retrieved_Gtid_Set: 65 Executed_Gtid_Set: 66 Auto_Position: 0 67 Replicate_Rewrite_DB: 68 Channel_Name: 69 Master_TLS_Version: 70 1 row in set (0.00 SEC)Copy the code
Step 3: Test the configuration on the client
1) Add connected users to access data on the primary server
Authorized users can add, delete, modify and check all data.
1] # mysql - uroot -p mysql password 2 > grant the select, insert, update, and delete on *. * to admin @ "%" identified by "123: QQQ... A"; 3 Query OK, 0 rows affected, 1 warning (0.03 SEC) 4 mysql> quitCopy the code
2) The client connects to the master server to access data
Connect on host 50 using the authorized user of primary server 51.
1]# mysql-h192.168.4.51 -uadmin -p123qqq... A 2 mysql> show grants; 3 +------------------------------------------------------------+ 4 | Grants for admin@% | 5 +------------------------------------------------------------+ 6 | GRANT SELECT, INSERT, UPDATE, TO DELETE ON *. * 'admin' @ '%' | 7 + -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + 8 1 row in the set (0.00) sec) 9 mysql> insert into db3.user(name,uid) values("lili",288); // The db3 library and the user table are existing on the primary server before the master/slave synchronization. 10 Query OK, 1 row affected (0.05 SEC) 11 mysql> insert into db3.user(name,uid) values("lili",288); 12 Query OK, 1 row affected (0.28 SEC) 13 mysql> insert into db3.user(name,uid) values("lili",288); 14 Query OK, 1 row affected (0.05 SEC) 15 mysql> select name,uid from db3.user where name="lili"; 16 +------+------+ 17 | name | uid | 18 +------+------+ 19 | lili | 288 | 20 | lili | 288 | 21 | lili | 288 | 22 +------+------+ 23 3 rows in set (0.00 SEC)Copy the code
- The client connection accesses data from the server
Client 50 A host using an authorized user to connect to a secondary server can see the same data as the primary server
1]# mysql -h192.168.4.52 -uadmin -p123qqq... A 2 mysql> select name,uid from db3.user where name="lili"; 3 +------+------+ 4 | name | uid | 5 +------+------+ 6 | lili | 288 | 7 | lili | 288 | 8 | lili | 288 | 9 +------+------+ 10 3 rows in set (0.00 SEC)Copy the code
Two, a master multi – subordinate structure
- Configure the database server 192.168.4.53 as the secondary server of host 192.168.4.51
- Client tests configuration.
Create a NEW VM, set its IP address to 192.168.4.53, run the database service, and the database administrator root can log in to the VM.[Obtaining resources]
Step 1: Configure the secondary server 192.168.4.53
1) Enable binlog
1 ]# vim /etc/my.cnf
2 [mysqld]
3 server_id=53 //server_id
4 :wq
5 ]# systemctl restart mysqld
Copy the code
2) Ensure that the data is consistent with the master server
Backup all data on primary server 51 and copy the backup file to server 53.
1]# mysqldump -uroot -p123qqq... A -- master-data -- B db4 db3 > /root/twodb.sql 2]# SCP /root/twodb.sql [email protected]:/root/Copy the code
Restore data on host 53 using the backup file and view the log name and offset recorded in the backup file.
1]# mysql -uroot -p123qqq... A < /root/twodb. SQL 2]# grep mater51 /root/twodb. SQL 3 CHANGE MASTER TO MASTER_LOG_FILE='master51.000001', MASTER_LOG_POS=1098; // Log name and offsetCopy the code
3) Specify the primary server information
Fill in the log file name and offset position as shown in the backup file.
1 mysql> change master to // specify master server 2 -> master_host= "192.168.4.51", // master server IP address 3 -> master_user= "repluser", // master server authorized user 4 -> master_password= "123qQQ... A ",// Master server authorization user password 5 -> master_log_file= "master51-bin.000001",// Master server log file 6 -> master_log_pos=1098; Mysql > start slave;Copy the code
Viewing Status Information
1]# mysql -- uroot -- p123qqq A - e "show slave status \ G" | grep -i 2 Slave_IO_Running: yes yes yes / / IO thread state 3 Slave_SQL_Running: 4]# mysql -- uroot -- p123qqq A - e "show slave status \ G" | grep -i "master_host" 5 master_host: 192.168.4.51 / / master server IP addressCopy the code
Step 2: Client Test (192.168.4.50)
1) Connect to the master server to insert new records
1]# mysql-h192.168.4.51 -uadmin -p123qqq... A 2 mysql> insert into db3.user(name,uid) values("lucy",888); // The db3 library and the user table are existing on the primary server before the master/slave synchronization. 3 Query OK, 1 row affected (0.05sec)Copy the code
2) The newly inserted data can be queried in local 53 of the slave server
1]# mysql -uroot -p123qqq... A 2 mysql> select name,uid from db3.user; 3 +------+------+ 4 | name | uid | 5 +------+------+ 6 | lili | 288 | 7 | lucy | 888 | 8 +------+------+ 9 2 rows in set (0.00 SEC)Copy the code
Configure the master/slave structure
- Configure host 192.168.4.53 as the primary server
- Example Set host 192.168.4.54 to the secondary server of host 53
- Example Set host 192.168.4.55 to the secondary server of host 54
- Client tests configuration.
Three VMS are used to run the mysql database service respectively, and the administrator root can log in to the vM. Host 192.168.4.53 Primary server. Host 192.168.4.54 is the secondary server. Host 192.168.4.55 is the secondary server.
Step 1: Prepare the environment
To ensure the consistency between the primary and secondary databases before enabling binlog and synchronization, ensure that data on the primary database exists on the secondary database, disable selinux, and disable the firewall service to ensure normal physical connections before primary and secondary synchronization is configured
1) Close the firewall and disable Selinux, which cannot be ignored:
1 ]# systemctl stop firewalld
2 ]# setenforce 0
Copy the code
Step 2: Configure the primary server 192.168.4.53
2) User authorization [Obtaining resources]
Mysql > grant replication slave on *.* to yaya@"%" identified by "12qqq... A, ". 3 Query OK, 0 rows affected, 1 warning (0.03 SEC)Copy the code
3) Enable binlog, modify /etc/my. CNF configuration, and restart MySQL server
Specify server ID to allow log synchronization:
1]# vim /etc/my.cnf 2 [mysqld] 3 log_bin=db53Copy the code
Mysql > restart mysql
1 ]# systemctl restart mysqld
Copy the code
5) Make sure there are two files under /var/lib/mysql:
1] # ls/var/lib/mysql/db51. * 2 / var/lib/mysql/db53.000001 / var/lib/mysql/db53 indexCopy the code
6) View logs about the active service
View the status of the master server and record the current log file name and offset position (required when the SLAVE initiates replication) :
1 mysql> show master status; 2 +-------------+----------+--------------+------------------+-------------------+ 3 | File | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set | 4 + -- -- -- -- -- -- -- -- -- -- -- -- - + -- -- -- -- -- -- -- -- -- - + -- -- -- -- -- -- -- -- -- -- -- -- -- - + -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - + -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - + 5 | db53.000001 | 437 | | | | 6 + -- -- -- -- -- -- -- -- -- -- -- -- - + -- -- -- -- -- -- -- -- -- - + -- -- -- -- -- -- -- -- -- -- -- -- -- - + -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - + -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + 7 1 row in the set (0.00 SEC)Copy the code
Step 3: Configure the secondary server 192.168.4.54
1) User authorization (connected user for data synchronization) on server 192.168.4.53
1]# mysql> grant replication slave on *.* to user55@ "%" identified by "654321";Copy the code
2) Modify the /etc/my. CNF configuration to enable binlog, specify the server_id and allow cascading replication
1]# vim /etc/my.cnf 2 [mysqld] 3 server_id=54 4 log-bin=db54 5 log_slave_updatesCopy the code
3) After the configuration is complete, restart the mysql service:
1 ]# systemctl restart mysqld
Copy the code
4) Make sure there are two files under /var/lib/mysql:
1] # ls/var/lib/mysql/db52. * 2 / var/lib/mysql/db54.000001 / var/lib/mysql/db54 indexCopy the code
5) View the log information in use
1 ]# mysql -uroot -p123456 2 mysql> show master status; 3 +-------------+----------+--------------+------------------+-------------------+ 4 | File | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set | 5 + -- -- -- -- -- -- -- -- -- -- -- -- - + -- -- -- -- -- -- -- -- -- - + -- -- -- -- -- -- -- -- -- -- -- -- -- - + -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - + -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - + 6 | db54.000001 | | 7 154 + -- -- -- -- -- -- -- -- -- -- -- -- - + -- -- -- -- -- -- -- -- -- - + -- -- -- -- -- -- -- -- -- -- -- -- -- - + -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - + -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + 8 1 row in the set (0.00 SEC) // View the log file name and offset positionCopy the code
Authenticate the authorized user of the master server
1]# mysql-h192.168.4.53-uyaya-p123456 2 mysql> //Copy the code
7) Use the change master statement to specify the IP address of the master server, the synchronization username/password, the start log file, and the offset position (see the status output on the master server) :
1]# mysql-uroot -p123456 23 mysql> change master to 45 -> master_host="192.168.4.53 "; 6 7 -> master_user="yaya", 8 9 -> master_password="123456", 10 11 -> master_log_file="db53.000001 "; 12 13 -> master_log_pos=437; 14 15 Query OK, 0 rows affected, 2 warnings (0.43 SEC)Copy the code
8) Start the slave process
1 mysql> start slave; 3 Query OK, 0 rows affected (0.03 SEC)Copy the code
9) To check the status of the slave server, run the show slave status statement to check the status of the slave server and ensure that the IO thread and SQL thread are running properly. The IO thread and SQL thread must be set to Yes
mysql> show slave status \G; * * * * * * * * * * * * * * * * * * * * * * * * Master_Host: 192.168.4.53 / / the main server IP address * * * * * * * * * * * * * * * * * * * * * * * * Slave_IO_Running: Yes //IO thread status Yes Slave_SQL_Running: Yes //SQL thread status YesCopy the code
Step 4: Configure the secondary server 192.168.4.55
1) Verify the authorized user of the master library
1]# mysql-uuser54-p654321 2 mysql: [Warning] Using a password on the command line interface can be insecure. 3 Welcome to the MySQL monitor. Commands end with ; or \g. 4 Your MySQL connection id is 7 5 Server version: 5.7.17- Log MySQL Community Server (GPL) 6 Copyright (C) 2000, 2016, Oracle and/or its affiliates. All rights reserved. 7 Oracle is a registered trademark of Oracle Corporation and/or its 8 affiliates. Other names may be trademarks of their respective 9 owners. 10 Type 'help; 'or '\h' for help.type '\c' to clear the current input statementCopy the code
2) Specify the server_id
1 [mysqld]
2 server_id=55
Copy the code
3) Restart the service
1 ]# systemctl restart mysqld
Copy the code
4) The administrator logs in to the specified master library information
1]# mysql-uroot -p123456 2 mysql> change master to 3 -> master_host="192.168.4.54 "; 4 - > master_user = "user55"; 5 -> master_password="654321", 6 -> master_log_file=" db54.000001 "; 7 -> master_log_pos=154; 8 Query OK, 0 rows affected, 2 warnings (0.37 SEC)Copy the code
5) Start the slave process
1 mysql> start slave;
2 Query OK, 0 rows affected (0.04 sec)
Copy the code
6) View the process status
1 mysql> show slave status\G 2 *************************** 1\. row *************************** 3 Slave_IO_State: Waiting for Master to send event 4 Master_Host: 192.168.4.54 5 Master_User: user55 6 Master_Port: 3306 7 Connect_Retry: 60 8 Master_Log_File: db54.000001 9 Read_Master_Log_Pos: 154 10 Relay_Log_File: db55-relay_bin.000001 11 Relay_Log_Pos: db54.000001 9 Read_Master_Log_Pos: 154 10 Relay_Log_File: db55-relay_bin.000001 11 Relay_Log_Pos: db54.000001 315 12 Relay_Master_Log_File: DB54.000001 13 Slave_IO_Running: Yes 14 Slave_SQL_Running: YesCopy the code
Step 5: Verify the configuration on the client
A connection user who authorizes access to data in the master repository; The client connects to the master library to perform SQL operations matching permissions;
Authorized users connect to the first secondary library and can see the data of the primary library. The authorized user connects to the second secondary library and can see the data of the primary library
1) Authorize users to access gamedB libraries on the master server
1 ]# mysql -uroot -p123456
2 mysql> grant all on gamedb.* to dada@"%" identified by "123456";
3 Query OK, 0 rows affected, 1 warning (0.03 sec)
Copy the code
2) The client uses authorized users to connect to the master library, build libraries, tables and insert records
1]# mysql-h192.168.4.53 -udada-p123456 2 Welcome to the MariaDB monitor. or \g. 3 Your MySQL connection id is 7 4 Server version: 5.7.17-log MySQL Community Server (GPL) 5 Copyright (C) 2000, 2017, Oracle, MariaDB Corporation Ab and others. 6 Type 'help; 'or '\h' for help.type '\c' to clear the current input statement. 7 MySQL [(none)]> // database gamedb; Query OK, 1 row affected (0.04 SEC) 10 MySQL [(none)]> create table gamedb.t1(id int); Query OK, 0 rows affected (0.17 SEC) 12 MySQL [(none)]> INSERT into gamedb.t1 values(8888); Query OK, 1 row affected (0.22 SEC)Copy the code
3) When the client uses an authorized user to connect to two secondary libraries, it can also see the new library table records on the primary library
1]# mysql-h192.168.4.54-udada-p123456 # mysql-h192.168.4.54-udada-p123456 or \g. 3 Your MySQL connection id is 10 4 Server version: 5.7.17-log MySQL Community Server (GPL) 5 Copyright (C) 2000, 2017, Oracle, MariaDB Corporation Ab and others. 6 Type 'help; ' or '\h' for help. Type '\c' to clear the current input statement. 7 MySQL [(none)]> select * from gamedb.t1; / / insert query table 8 + -- -- -- -- -- - | | id + 9 10 + -- -- -- -- -- - + 11 | 8888 | -- -- -- -- -- - + 12 + 13 1 row in the set (0.00 SEC) 14 MySQL/(none) > exit 15 [root@room9pc01 ~]# mysql-h192.168.4.55 -udada-p123456 with ; or \g. 17 Your MySQL connection id is 6 18 Server version: 5.7.17 MySQL Community Server (GPL) 19 Copyright (C) 2000, 2017, Oracle, MariaDB Corporation Ab and others. 20 Type 'help; ' or '\h' for help. Type '\c' to clear the current input statement. 21 MySQL [(none)]> select * from gamedb.t1; 22 23 | + -- -- -- -- -- - + 24 + id | -- -- -- -- -- - + 25 26 8888 | | + -- -- -- -- -- - + 27 1 row in the set (0.00 SEC)Copy the code
Configure the semi-synchronous replication mode
- Enable the semi-synchronous replication mode for one primary and Multiple secondary servers 192.168.4.54
- Check whether the semi-synchronous replication mode is enabled
Secondary server 192.168.4.54 is used as an example to illustrate the configuration.54 The host functions as both the master server and slave server. Therefore, the semi-synchronous replication modules and functions of the two roles must be enabled. [Obtaining resources]
Step 1: Check whether dynamic loading of modules is allowed.
1) Check whether dynamic loading of modules is allowed (default allowed)
1 mysql> show variables like 'have_dynamic_loading'; 2 +----------------------+-------+ 3 | Variable_name | Value | 4 +----------------------+-------+ 5 | Have_dynamic_loading | YES | 6 + -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - + -- -- -- -- -- -- -- + 7 1 row in the set (0.01 SEC)Copy the code
2) Command line loading plug-in
Mysql > install plugin rpl_semi_sync_master SONAME "semisync_master.so"; Mysql > install plugin rpl_semi_sync_slave SONAME 'semisync_slave.so'; // Load the slave moduleCopy the code
Check whether the module is successfully installed:
1 mysql> select plugin_name, plugin_status from information_schema.plugins where plugin_name like '%semi%'; 2 +----------------------+---------------+ 3 | PLUGIN_NAME | PLUGIN_STATUS | 4 +----------------------+---------------+ 5 | rpl_semi_sync_master | ACTIVE | / / module installation is successful 6 | rpl_semi_sync_slave | ACTIVE | 7 + -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - + -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + 8 2 rows in the set (0.00 SEC)Copy the code
3) Enable semi-synchronous replication (semi-synchronous replication is disabled by default after the plug-in is installed)
1 mysql> set global rpl_semi_sync_master_enabled = 1; Query OK, 0 rows affected (0.00 SEC) 3 mysql> set global rpl_semi_sync_slave_enabled = 1; Query OK, 0 rows affected (0.00 SEC)Copy the code
Check whether semi-synchronous replication is enabled.
1 mysql> show variables like "rpl_semi_sync_%_enabled"; 2 +------------------------------+-------+ 3 | Variable_name | Value | 4 +------------------------------+-------+ 5 | Check rpl_semi_sync_master_enabled | | / / module enabled 6 | rpl_semi_sync_slave_enabled | ON | 7 + -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - + -- -- -- -- -- -- -- + 8 2 rows in the set (0.00 SEC)Copy the code
4) Modify the configuration file to permanently enable semi-synchronous replication
1 [root@master51 ~]# vim /etc/my.cnf 2 [mysqld] 3 plugin-load="rpl_semi_sync_master=semisync_master.so; Rpl_semi_sync_slave =semisync_slave.so" 4 rpl-semi-sync-master-enabled = 1 5 rpl-semi-sync-slave-enabled = 1 6: wqCopy the code
5) Restart the database service and view the database status
1 ]# mystemctl restart mysqld 2 ]# mysql -uroot -p123qqq... A 3 mysql> select plugin_name, plugin_status from information_schema.plugins where plugin_name like '%semi%'; 4 +----------------------+---------------+ 5 | plugin_name | plugin_status | 6 +----------------------+---------------+ 7 | rpl_semi_sync_master | ACTIVE 8 | | / / module loaded rpl_semi_sync_slave | ACTIVE | 9 + -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - + -- -- -- -- -- -- -- -- -- -- -- -- -- -- - + 10 2 rows in the set (0.00 SEC) 11 mysql > show the variables like "rpl_semi_sync_%_enabled"; 12 +------------------------------+-------+ 13 | Variable_name | Value | 14 +------------------------------+-------+ 15 | rpl_semi_sync_master_enabled | ON 16 | | / / mode is enabled rpl_semi_sync_slave_enabled | ON | 17 + -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - + -- -- -- -- -- -- -- + 2 rows in the set of 18 (0.00 SEC)Copy the code
In the end, I wish you all success as soon as possible, get satisfactory offer, fast promotion and salary increase, and walk on the peak of life.
If you can, please give me a three support me??????[Obtain information]