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
| bind-address = 0.0.0.0 |
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/mysql restart | |
| mysql -u root -p | |
| Enter password: [enter the MySQL root password you chose earlier] | |
| 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 -h db-02.vm.xeriom.net -u root -p | |
| Enter password: [enter the MySQL root password you chose earlier] | |
| ERROR 1130 (00000): Host 'db-01' is not allowed to connect to this MySQL server |
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
| Can't connect to MySQL server on 'db-02' (10061) |
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 = 1 | |
| log_bin = /var/log/mysql/mysql-bin.log | |
| expire_logs_days = 10 | |
| max_binlog_size = 100M | |
| binlog_do_db = my_application | |
| binlog_ignore_db = mysql | |
| binlog_ignore_db = test |
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 root -p | |
| Enter password: [enter the MySQL root password you chose earlier] | |
| mysql> grant replication slave on *.* to 'replication'@'db-02.vm.xeriom.net' identified by 'some_password'; | |
| mysql> \q | |
| sudo /etc/init.d/mysql restart |
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 | |
| master-host = db-01.vm.xeriom.net | |
| master-user = replication | |
| master-password = some_password | |
| master-port = 3306 |
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
| # Run this on db-02 only | |
| sudo /etc/init.d/mysql restart | |
| mysql -u root -p | |
| Enter password: [enter the MySQL root password you chose earlier] | |
| mysql> show slave status \G | |
| *************************** 1. row *************************** | |
| Slave_IO_State: Waiting for master to send event | |
| Master_Host: 193.219.108.241 | |
| Master_User: replication | |
| Master_Port: 3306 |
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 nodes | |
| mysql -u root -p | |
| Enter password: [enter the MySQL root password you chose earlier] | |
| mysql> show databases; |
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 only | |
| mysql -u root -p | |
| Enter password: [enter the MySQL root password you chose earlier] | |
| mysql> create database my_application;; |