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
| sudo chmod go-wrx /etc/ha.d/authkeys |
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
| auth 2 | |
| 2 sha1 your-password-here |
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
| logfile /var/log/ha-log | |
| logfacility local0 | |
| keepalive 2 | |
| deadtime 30 | |
| initdead 120 | |
| bcast eth0 | |
| udpport 694 | |
| auto_failback on | |
| node db-01.vm.xeriom.net | |
| node db-02.vm.xeriom.net |
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
| db-01.vm.xeriom.net 193.219.108.243 |
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
| sudo /etc/init.d/heartbeat start |
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
| heartbeat[7734]: 2008/07/07_17:19:34 info: Initial resource acquisition complete (T_RESOURCES(us)) | |
| IPaddr[7739]: 2008/07/07_17:19:37 INFO: Running OK | |
| heartbeat[7745]: 2008/07/07_17:19:37 info: Local Resource acquisition completed. |
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
| # On both boxes | |
| sudo iptables -I INPUT 3 -p tcp --dport mysql -s 193.214.108.10 -d 193.214.108.243 -j ACCEPT |
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
| # on both boxes | |
| mysql -u root -p | |
| Enter password: [enter the MySQL root password you chose earlier] | |
| mysql> grant all, replication_client on my_application.* to 'some_user'@'193.214.108.10' identified by 'some_other_password'; | |
| mysql> \q |
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 -u some_user -p -h 193.214.108.243 my_application | |
| mysql> show slave status \G | |
| *************************** 1. row *************************** | |
| Slave_IO_State: Waiting for master to send event | |
| Master_Host: 193.219.108.242 | |
| [unimportant lines snipped] |
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
| # On db-01, in /etc/mysql/my.cnf | |
| auto-increment-increment = 10 | |
| auto-increment-offset = 1 |