>  기사  >  데이터 베이스  >  MySQL5.5配置安装半同步复制

MySQL5.5配置安装半同步复制

WBOY
WBOY원래의
2016-06-07 17:35:001021검색

确认master和slave上是否开启have_dynamic_loading master MASTER@root@(none) 10:54:58gt;show variables like

确认master和slave上是否开启have_dynamic_loading

master

MASTER@root@(none) 10:54:58>show variables like 'have_dynamic_loading';
+----------------------+-------+
| Variable_name | Value |
+----------------------+-------+
| have_dynamic_loading | YES |
+----------------------+-------+
MASTER@root@(none) 10:54:58>show variables like 'have_dynamic_loading';
+----------------------+-------+
| Variable_name        | Value |
+----------------------+-------+
| have_dynamic_loading | YES  |
+----------------------+-------+slave

SLAVE@root@test 10:47:52>show variables like 'have_dynamic_loading';
+----------------------+-------+
| Variable_name | Value |
+----------------------+-------+
| have_dynamic_loading | YES |
+----------------------+-------+
SLAVE@root@test 10:47:52>show variables like 'have_dynamic_loading';
+----------------------+-------+
| Variable_name        | Value |
+----------------------+-------+
| have_dynamic_loading | YES  |
+----------------------+-------+
使用root在master上安装半同步插件

MASTER@root@(none) 10:58:14>
MASTER@root@(none) 10:58:14>install plugin rpl_semi_sync_master soname 'semisync_master.so';
Query OK, 0 rows affected (0.01 sec)

MASTER@root@(none) 10:58:22>show plugins;
+--------------------------+--------+--------------------+--------------------+---------+
| Name | Status | Type | Library | License |
+--------------------------+--------+--------------------+--------------------+---------+
| binlog | ACTIVE | STORAGE ENGINE | NULL | GPL |
| mysql_native_password | ACTIVE | AUTHENTICATION | NULL | GPL |
| mysql_old_password | ACTIVE | AUTHENTICATION | NULL | GPL |
| MRG_MYISAM | ACTIVE | STORAGE ENGINE | NULL | GPL |
| CSV | ACTIVE | STORAGE ENGINE | NULL | GPL |
| MEMORY | ACTIVE | STORAGE ENGINE | NULL | GPL |
| MyISAM | ACTIVE | STORAGE ENGINE | NULL | GPL |
| InnoDB | ACTIVE | STORAGE ENGINE | NULL | GPL |
| INNODB_TRX | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_LOCKS | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_LOCK_WAITS | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_CMP | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_CMP_RESET | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_CMPMEM | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_CMPMEM_RESET | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_BUFFER_PAGE | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_BUFFER_PAGE_LRU | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_BUFFER_POOL_STATS | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| BLACKHOLE | ACTIVE | STORAGE ENGINE | NULL | GPL |
| ARCHIVE | ACTIVE | STORAGE ENGINE | NULL | GPL |
| FEDERATED | ACTIVE | STORAGE ENGINE | NULL | GPL |
| PERFORMANCE_SCHEMA | ACTIVE | STORAGE ENGINE | NULL | GPL |
| partition | ACTIVE | STORAGE ENGINE | NULL | GPL |
| rpl_semi_sync_master | ACTIVE | REPLICATION | semisync_master.so | GPL |
+--------------------------+--------+--------------------+--------------------+---------+
MASTER@root@(none) 10:58:14>
MASTER@root@(none) 10:58:14>install plugin rpl_semi_sync_master soname 'semisync_master.so';
Query OK, 0 rows affected (0.01 sec)

MASTER@root@(none) 10:58:22>show plugins;
+--------------------------+--------+--------------------+--------------------+---------+
| Name                    | Status | Type              | Library            | License |
+--------------------------+--------+--------------------+--------------------+---------+
| binlog                  | ACTIVE | STORAGE ENGINE    | NULL              | GPL    |
| mysql_native_password    | ACTIVE | AUTHENTICATION    | NULL              | GPL    |
| mysql_old_password      | ACTIVE | AUTHENTICATION    | NULL              | GPL    |
| MRG_MYISAM              | ACTIVE | STORAGE ENGINE    | NULL              | GPL    |
| CSV                      | ACTIVE | STORAGE ENGINE    | NULL              | GPL    |
| MEMORY                  | ACTIVE | STORAGE ENGINE    | NULL              | GPL    |
| MyISAM                  | ACTIVE | STORAGE ENGINE    | NULL              | GPL    |
| InnoDB                  | ACTIVE | STORAGE ENGINE    | NULL              | GPL    |
| INNODB_TRX              | ACTIVE | INFORMATION SCHEMA | NULL              | GPL    |
| INNODB_LOCKS            | ACTIVE | INFORMATION SCHEMA | NULL              | GPL    |
| INNODB_LOCK_WAITS        | ACTIVE | INFORMATION SCHEMA | NULL              | GPL    |
| INNODB_CMP              | ACTIVE | INFORMATION SCHEMA | NULL              | GPL    |
| INNODB_CMP_RESET        | ACTIVE | INFORMATION SCHEMA | NULL              | GPL    |
| INNODB_CMPMEM            | ACTIVE | INFORMATION SCHEMA | NULL              | GPL    |
| INNODB_CMPMEM_RESET      | ACTIVE | INFORMATION SCHEMA | NULL              | GPL    |
| INNODB_BUFFER_PAGE      | ACTIVE | INFORMATION SCHEMA | NULL              | GPL    |
| INNODB_BUFFER_PAGE_LRU  | ACTIVE | INFORMATION SCHEMA | NULL              | GPL    |
| INNODB_BUFFER_POOL_STATS | ACTIVE | INFORMATION SCHEMA | NULL              | GPL    |
| BLACKHOLE                | ACTIVE | STORAGE ENGINE    | NULL              | GPL    |
| ARCHIVE                  | ACTIVE | STORAGE ENGINE    | NULL              | GPL    |
| FEDERATED                | ACTIVE | STORAGE ENGINE    | NULL              | GPL    |
| PERFORMANCE_SCHEMA      | ACTIVE | STORAGE ENGINE    | NULL              | GPL    |
| partition                | ACTIVE | STORAGE ENGINE    | NULL              | GPL    |
| rpl_semi_sync_master    | ACTIVE | REPLICATION        | semisync_master.so | GPL    |
+--------------------------+--------+--------------------+--------------------+---------+
使用root在slave上安装半同步插件

SLAVE@root@test 10:55:18>install plugin rpl_semi_sync_slave soname 'semisync_slave.so';
Query OK, 0 rows affected (0.01 sec)

성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.