In addition, if it passes for 5 consecutive checks ( rise 5), it then moves out of a fault state. If it fails for 5 consecutive checks ( fall 5) than that instance will move to a FAULT state. This means that every 2 seconds (interval 2), we will run a check to see if the mysqld process is running ( script “/sbin/pidof mysqld”). } Deploy our notification script on both smesql01 and smesql02īy default we are using the following details for our regular checks to validate that the services are running Note: Update the first line below to replace all items in with your environment specific entries smesql02 nf Notify "/usr/libexec/keepalived/keepalived_state.sh" root So we will record and use the following values: | File | Position | Binlog_Do_DB | Binlog_Ignore_DB | Now we will get the master information for smesql02, just like we did for smesql01 Mysql -e "GRANT REPLICATION SLAVE ON *.* TO -e "FLUSH PRIVILEGES " Mysql -e "CREATE USER repl_user IDENTIFIED by '' " Next we will setup the replication user on smesql02 as well. You will be looking for the following two lines to verify you have setup replication correctly. Note: Update the first line below to replace all items in with your environment specific entries mysql -e "CHANGE MASTER TO MASTER_HOST='smesql01', MASTER_USER='repl_user', MASTER_PASSWORD='', MASTER_LOG_FILE='', MASTER_LOG_POS= " Now that we've got both databases in sync, we can take the data we gathered in the master status of smesql01 to setup the slave relationship from smesql01 → smesql02. Split brain reconciliation is not possible and recovery of services can/will require restoration of the database from a backup before a split brain event.įor this reason, when deploying across multiple data centers or regions with possibility of network partitions, please follow SME File Fabric HA Setup "2 x 2" With Manual Failover Introduction For more information please contact setup is supported for mysql nodes which are deployed in a single data centre.Ĭross region networks can become partitioned resulting in both masters becoming active at the same time(split brain). SME designs, implements and supports HA (High Availability) File Fabric solutions for customers on a paid professional services basis. Furthermore, we do not warrant that the design presented here is appropriate for your requirements. We accept no responsibility for errors or omissions, nor do we have any obligation to provide support for implementing or maintaining the configuration described here. This is my current mysql my.The information in this document is provided on an as-is basis. Thanks, and have a nice weekend everybody If not, is there someone here, help me about how to / tutorial guide of creating mysql master-slave replication between 2 machines, both using vestacp?Īny help would be appreciate, and i really need all the help you can give. So, my question is, where are that "bind-address" config located? Does vesta have a different place to put other mysql config? I check on the my.cnf and find out, it does not have any "bind-address" setting. (i am using debian, so it is located on /etc/mysql/my.cnf) In many tutorial i read, the first step the mention are about changing the "bind-address" setting, on the my.cnf file. I have read some tutorial, and i think i quite understand how it works but already find a difficulties on my first step already. I am not by any mean a webmaster, in fact i am just a noob whom still learning my way.Ĭurrently i want to setup, a master-slave mysql database replication (this is my first time doing this). Now, i am on a project and need some kind of a redundancy. I am using vestacp for a while and very happy with it.
0 Comments
Leave a Reply. |