Re: Promoting MySQL 5.5 slave to master
- Mensaje original - De: Manuel Arostegui Para: Miguel Gonzalez CC: mysql@lists.mysql.com Enviado: Jueves 21 de marzo de 2013 9:17 Asunto: Re: Promoting MySQL 5.5 slave to master 2013/3/21 Miguel Gonzalez > > > > Can you elaborate about this? I thought that once you fixed the issues in > the master server you needed to set it as slave of the new promoted master > server, and do the other way round. > > > By having both MySQL replicating from each other, you'd avoid this. I'm trying not to overcomplicate things. Also the server where the replica of the production server is is not active at all. I thought master-master configuration where more common when you were behind a web balancer. I thought also that replication had changed in MySQL 5.5. Is that difficult to find a clear procedure for performing a mysql failover when a server crashed? >Make sure you do "reply all" instead of replying only to me :-) Sorry about that, I thought the list was configured differently Miguel -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
Re: Promoting MySQL 5.5 slave to master
>[AM] If you've the option to use MySQL 5.6 then managing replication is a lot >simpler and more reliable... >http://www.clusterdb.com/mysql-replication/mysql-5-6-ga-replication-enhancements/ >MySQL 5.6 Failing over is described in section 5 of >http://www.mysql.com/why-mysql/white-papers/mysql-replication-tutorial/ - note >that the paper deals with a more complex scenario where there are multiple >>slaves and so you could simplify. I don't normally rush when it comes to upgrading services. MySQL 5.6 has been recently released and I prefer until the RPM package has been included in most YUM repos and it has been throughly tested. I still remember how painful was to install a new system with MySQL (5.5 I believe) under Ubuntu last May. I had to report a bug and make some tweaks in order to get the mysql service installed. Regards, Miguel -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
RE: Promoting MySQL 5.5 slave to master
> -Original Message- > From: Miguel Gonzalez [mailto:miguel_3_gonza...@yahoo.es] > Sent: 21 March 2013 08:29 > To: Manuel Arostegui > Cc: mysql@lists.mysql.com > Subject: Re: Promoting MySQL 5.5 slave to master > > > > > > - Mensaje original - > De: Manuel Arostegui > Para: Miguel Gonzalez > CC: mysql@lists.mysql.com > Enviado: Jueves 21 de marzo de 2013 9:17 > Asunto: Re: Promoting MySQL 5.5 slave to master > > 2013/3/21 Miguel Gonzalez > > > > > > > > > Can you elaborate about this? I thought that once you fixed the issues > > in the master server you needed to set it as slave of the new promoted > > master server, and do the other way round. > > > > > > > By having both MySQL replicating from each other, you'd avoid this. > > I'm trying not to overcomplicate things. Also the server where the replica of > the production server is is not active at all. I thought master-master > configuration where more common when you were behind a web balancer. > > I thought also that replication had changed in MySQL 5.5. Is that difficult to > find a clear procedure for performing a mysql failover when a server > crashed? [AM] If you've the option to use MySQL 5.6 then managing replication is a lot simpler and more reliable... http://www.clusterdb.com/mysql-replication/mysql-5-6-ga-replication-enhancements/ MySQL 5.6 Failing over is described in section 5 of http://www.mysql.com/why-mysql/white-papers/mysql-replication-tutorial/ - note that the paper deals with a more complex scenario where there are multiple slaves and so you could simplify. > > >Make sure you do "reply all" instead of replying only to me :-) > > Sorry about that, I thought the list was configured differently > > Miguel > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe:http://lists.mysql.com/mysql > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
Re: Promoting MySQL 5.5 slave to master
2013/3/21 Miguel Gonzalez > > > > Can you elaborate about this? I thought that once you fixed the issues in > the master server you needed to set it as slave of the new promoted master > server, and do the other way round. > > That's why you might want to have master-master replication to avoid this manual process every time the active master dies. Anyways, you're right - you'd need to configure the dead master to become a slave of the new master. In order to do so, you need to now the binlog file and position the new master had before getting the VIP. You'd need to check the binlogs. By having both MySQL replicating from each other, you'd avoid this. Make sure you do "reply all" instead of replying only to me :-) Manuel.
Re: Promoting MySQL 5.5 slave to master
2013/3/21 Miguel González Castaños > Dear all, > >I have a pretty simple setup. A LAMP server in production and a > failover LAMP server in case the main server is down. > >I have been searching around to find out a clear answer of how to > proceed when you need to promote a MySQL 5.5 slave server when the master > (also 5.5) has crashed. > >So far I have read that if the master crashes I should issue an stop > slave in the slave server and restart the mysql service (otherwise the > master info is still kept in memory) with a skip-start-slave setting. Is > that right? Is that all? > > Hi Miguel, Do you have a master-master replication between them? How is the failover over done? Do you just move a VIP between them? Anyways, there's no need to do stop slave or restar MySQL service in the new master...you just need to set it active (move the VIP, pointing your Apache manually to write to it, however you do it). What you have to make sure though is about the read_only parameter. Make sure the new master comes back to life with read_only = ON just to avoid any problems. The standby master should always have read_only = ON until it becomes active. Manuel.