Skip to content

Instantly share code, notes, and snippets.

@srockstyle
Created February 20, 2014 07:58
Show Gist options
  • Select an option

  • Save srockstyle/9108844 to your computer and use it in GitHub Desktop.

Select an option

Save srockstyle/9108844 to your computer and use it in GitHub Desktop.
CentOSでMySQL5.5いれて準同期レプリケーション組むまで ref: http://qiita.com/srockstyle/items/aa6220a58ba9d8318155
GRANT REPLICATION SLAVE ON *.* TO 'slave-user'@'%' IDENTIFIED BY 'slave-password';
show master status;
CHANGE MASTER TO MASTER_HOST = '[IPADDRESS]', MASTER_USER = '[USER]', MASTER_PASSWORD = '[PASSWORD]',MASTER_PORT=3306;
start slave;
mysql> SHOW GLOBAL VARIABLES LIKE "rpl%";
+------------------------------------+-------+
| Variable_name | Value |
+------------------------------------+-------+
| rpl_recovery_rank | 0 |
| rpl_semi_sync_master_enabled | ON |
| rpl_semi_sync_master_timeout | 10 |
| rpl_semi_sync_master_trace_level | 32 |
| rpl_semi_sync_master_wait_no_slave | ON |
+------------------------------------+-------+
5 rows in set (0.01 sec)
mysql> SHOW GLOBAL VARIABLES LIKE "rpl%";
+---------------------------------+-------+
| Variable_name | Value |
+---------------------------------+-------+
| rpl_recovery_rank | 0 |
| rpl_semi_sync_slave_enabled | ON |
| rpl_semi_sync_slave_trace_level | 32 |
+---------------------------------+-------+
3 rows in set (0.00 sec)
mysql> SHOW STATUS LIKE 'Rpl_semi_sync%';
+----------------------------+-------+
| Variable_name | Value |
+----------------------------+-------+
| Rpl_semi_sync_slave_status | ON |
+----------------------------+-------+
1 row in set (0.00 sec)
server-id=2
sync_binlog=1
log-bin=mysql-bin
plugin-load=rpl_semi_sync_slave=semisync_slave.so
rpl_semi_sync_slave_enabled=1
read_only
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment