Get the App
SLTechnology News&Howtos  ›  Database  › 

Installation steps of mysql5.6 semi-synchronous Master and Slave

Shulou Source: shulou.com Published: 2022-05-31 18:31:11 09月18日 Update

This article mainly explains the "mysql5.6 semi-synchronous master-slave installation steps", the article explains the content is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "mysql5.6 semi-synchronous master-slave installation steps" bar!

As soon as the configuration is completed, the master and slave

Install and configure plug-ins

1 master:

Command help:

Mysql > help install

Name: 'INSTALL PLUGIN'

Description:

Syntax:

INSTALL PLUGIN plugin_name SONAME 'shared_library_name'

1) plug-in installation:

Mysql > install plugin rpl_semi_sync_master SONAME 'semisync_master.so'

Query OK, 0 rows affected (0.88 sec)

Mysql > show variables like'% semi%'

+-+ +

| | Variable_name | Value |

+-+ +

| | rpl_semi_sync_master_enabled | OFF |

| | rpl_semi_sync_master_timeout | 10000 | Unit: milliseconds. Default is 10 seconds. |

| | rpl_semi_sync_master_trace_level | 32 | |

| | rpl_semi_sync_master_wait_no_slave | ON |

+-+ +

4 rows in set (0.01sec)

2) start the plug-in and set parameters

Mysql > set global rpl_semi_sync_master_enabled=1

Query OK, 0 rows affected (0.00 sec)

Mysql > set global rpl_semi_sync_master_timeout=2000

Query OK, 0 rows affected (0.00 sec)

Mysql > show variables like'% semi%'

+-+ +

| | Variable_name | Value |

+-+ +

| | rpl_semi_sync_master_enabled | ON |

| | rpl_semi_sync_master_timeout | 2000 | |

| | rpl_semi_sync_master_trace_level | 32 | |

| | rpl_semi_sync_master_wait_no_slave | ON |

+-+ +

4 rows in set (0.00 sec)

2 slave:

1) install the plug-in

Mysql > install plugin rpl_semi_sync_slave soname 'semisync_slave.so'

Query OK, 0 rows affected (0.30 sec)

Mysql > show variables like'% semi%'

+-+ +

| | Variable_name | Value |

+-+ +

| | rpl_semi_sync_slave_enabled | OFF |

| | rpl_semi_sync_slave_trace_level | 32 | |

+-+ +

2 rows in set (0.00 sec)

2) start the plug-in

Mysql > set global rpl_semi_sync_slave_enabled=1

Query OK, 0 rows affected (0.00 sec)

Mysql > stop slave IO_thread

Query OK, 0 rows affected (0.82 sec)

Mysql > start slave IO_thread

Query OK, 0 rows affected (0.00 sec)

Check configuration and verification

Mysql > show global status like'% semi%'

+-+ +

| | Variable_name | Value |

+-+ +

| | Rpl_semi_sync_master_clients | 1 | displays the number of semi-synchronous slave |

| | Rpl_semi_sync_master_net_avg_wait_time | 0 | |

| | Rpl_semi_sync_master_net_wait_time | 0 | |

| | Rpl_semi_sync_master_net_waits | 0 | |

| | Rpl_semi_sync_master_no_times | 0 | |

| | Rpl_semi_sync_master_no_tx | 0 | |

| | Rpl_semi_sync_master_status | ON |

| | Rpl_semi_sync_master_timefunc_failures | 0 | |

| | Rpl_semi_sync_master_tx_avg_wait_time | 0 | |

| | Rpl_semi_sync_master_tx_wait_time | 0 | |

| | Rpl_semi_sync_master_tx_waits | 0 | |

| | Rpl_semi_sync_master_wait_pos_backtraverse | 0 | |

| | Rpl_semi_sync_master_wait_sessions | 0 | |

| | Rpl_semi_sync_master_yes_tx | 0 | |

+-+ +

14 rows in set (0.01 sec)

Uninstall the plug-in

Mysql > help uninstall

Name: 'UNINSTALL PLUGIN'

Description:

Syntax:

UNINSTALL PLUGIN plugin_name

Note:

Once a wait times out, it will be automatically downgraded to asynchronous

Thank you for reading, the above is the content of "mysql5.6 semi-synchronous master-slave installation steps". After the study of this article, I believe you have a deeper understanding of the installation steps of mysql5.6 semi-synchronous master-slave installation, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Tags: Plug-ins master-slave synchronization steps learning configuration content verification units parameters commands that is ideas situations quantity articles more knowledge points articles Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft Shulou Tech Info MariaDB Redmi Docker