Created
February 20, 2014 07:58
-
-
Save srockstyle/9108844 to your computer and use it in GitHub Desktop.
CentOSでMySQL5.5いれて準同期レプリケーション組むまで ref: http://qiita.com/srockstyle/items/aa6220a58ba9d8318155
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| GRANT REPLICATION SLAVE ON *.* TO 'slave-user'@'%' IDENTIFIED BY 'slave-password'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| show master status; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CHANGE MASTER TO MASTER_HOST = '[IPADDRESS]', MASTER_USER = '[USER]', MASTER_PASSWORD = '[PASSWORD]',MASTER_PORT=3306; | |
| start slave; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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