RE: Chain Replication QUestion
If you're able to use MySQL 5.6 and enable GTIDs then it gets a whole lot simpler as you don't need to worry about finding the correct positions in the binary logs. Take a look at http://www.mysql.com/why-mysql/white-papers/mysql-replication-high-availability/ and http://www.mysql.com/why-mysql/white-papers/mysql-replication-tutorial/ Andrew. -Original Message- From: Rick James [mailto:rja...@yahoo-inc.com] Sent: 01 May 2013 16:29 To: Richard Reina; Manuel Arostegui Cc: mysql@lists.mysql.com Subject: RE: Chain Replication QUestion 1) Enable log-bin on master2 (slave that will be converted to a master) That does not 'convert' it -- it makes it both a Master and a Slave (a Relay). The CHANGE MASTER is probably correct, but it is difficult to find the right spot. A simple way is to 1. Stop all writes everywhere. 2. Wait for replication to catchup everywhere. 3. FLUSH LOGS everywhere. 4. Now CHANGE MASTER on the Slave to the start (POS=0 or 4) of the freshly created binlog in the machine that is the Slave's new Master. 5. Start writes. -Original Message- From: Richard Reina [mailto:gatorre...@gmail.com] Sent: Wednesday, May 01, 2013 6:00 AM To: Manuel Arostegui Cc: mysql@lists.mysql.com Subject: Re: Chain Replication QUestion Hello Manuel, Thank you for your reply. Could I do the following?: 1) Enable log-bin on master2 (slave that will be converted to a master) 2) Enable log-slave-updates on master2 3) Execute CHANGE MASTER to on another existing slave so that it gets it's updates from master2 instead of master1. Thanks for the help thus far. 2013/4/30, Manuel Arostegui man...@tuenti.com: 2013/4/30 Richard Reina gatorre...@gmail.com I have a few slaves set up on my local network that get updates from my main mysql database master. I was hoping to turn one into a master while keeping it a slave so that I can set up a chain. Does anyone know where I can find a how to or other documentation for this specific task? It is quite easy: Enable log-slave-updates in the slave you want to be a master. Do a mysqldump -e --master-data=2 and put that mysqldump in the future slaves. Take a look at the first lines of the mysqldump where you'll find the position and logfile those slaves need to start the replication from. You can also use xtrabackup if you like. Manuel. -- 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 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
RE: MySQL Cluster or MySQL Cloud
Hi Neil, If you use MySQL Cluster then you have synchronous replication between the 2 data nodes which means that if one should fail you're guaranteed that the other contains the effects of every committed transaction and that the change has already been applied and so there is no delay while relay logs are applied before the automatic failover kicks in - which is why it can take less than a second. You also have a good scale-out story with MySQL Cluster as you can just continue to add more nodes (256 in total, 48 of which can be data nodes) withou having to worry about partitioning, failover etc. Regards, Andrew. -Original Message- From: Neil Tompkins [mailto:neil.tompk...@googlemail.com] Sent: 29 April 2013 14:50 To: Andrew Morgan Cc: [MySQL] Subject: Re: MySQL Cluster or MySQL Cloud Hi Andrew, Thanks for your response and the useful white paper. I've read the document in great detail. I'm looking for the best up time possible for my application and am still struggling to see the major differences with MySQL cluster compared to MySQL in the Cloud on multiple servers; apart from MySQL Cluster being much better solution for automatic failover including IP failover. Regards, Neil On Mon, Apr 29, 2013 at 8:47 AM, Andrew Morgan andrew.mor...@oracle.comwrote: Hi Neil, I hate just sending people off to white papers but you might get some good insights by taking a look at the MySQL Guide to High Availability Solutions paper - http://www.mysql.com/why-mysql/white-papers/mysql-guide-to-high- availa bility-solutions/ Regards, Andrew. Andrew Morgan - MySQL High Availability Product Management andrew.mor...@oracle.com @andrewmorgan www.clusterdb.com -Original Message- From: Neil Tompkins [mailto:neil.tompk...@googlemail.com] Sent: 27 April 2013 23:28 To: [MySQL] Subject: Fwd: MySQL Cluster or MySQL Cloud If deploying MySQL in the Cloud with two MySQL servers with master to master replication i have a good failover solution. Whats the different in terms of availability if we opted for MySQL Cluster instead ? -- 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: MySQL Cluster or MySQL Cloud
Hi Neil, I hate just sending people off to white papers but you might get some good insights by taking a look at the MySQL Guide to High Availability Solutions paper - http://www.mysql.com/why-mysql/white-papers/mysql-guide-to-high-availability-solutions/ Regards, Andrew. Andrew Morgan - MySQL High Availability Product Management andrew.mor...@oracle.com @andrewmorgan www.clusterdb.com -Original Message- From: Neil Tompkins [mailto:neil.tompk...@googlemail.com] Sent: 27 April 2013 23:28 To: [MySQL] Subject: Fwd: MySQL Cluster or MySQL Cloud If deploying MySQL in the Cloud with two MySQL servers with master to master replication i have a good failover solution. Whats the different in terms of availability if we opted for MySQL Cluster instead ? -- 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: Mysql Cluster Sync-UP
Hi Kevin, What do you mean by running MySQL in cluster mode - MySQL Cluster? If so then the data is stored in the data nodes rather than the MySQL Servers and so if bad data is written to one MySQL Server then that same bad data will be viewed through the other MySQL Server too. Regards, Andrew. -Original Message- From: Kevin Peterson [mailto:qh.res...@gmail.com] Sent: 09 April 2013 04:58 To: mysql@lists.mysql.com Subject: Mysql Cluster Sync-UP Hi, I am running My-SQL in cluster mode with two machine. Want to know if mysql database get corrupted on one of the machine will it force the corruption on the other machine too or in this case sync between two mysql instances will stop after the corruption. Thanks, Kevin Peterson -- 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: Converting Mysql to mysql cluster
-Original Message- From: Kevin Peterson [mailto:qh.res...@gmail.com] Sent: 27 March 2013 06:58 To: mysql@lists.mysql.com Subject: Converting Mysql to mysql cluster Hi, My site is using mysql and PHP, now for the scale purpose want to introduce mysql-cluster. Few questions are - 1. Do I need to change any code which is written in PHP. The answer is yes and no. There's a good chance that your application will work fine with MySQL Cluster without any changes *but* there are a few gotchas such as: - the current GA version of MySQL Cluster (7.2) doesn't implement Foreign Keys (coming in Cluster 7.3) - (ignoring BLOBs) rows cannot be larger than 13 Kb - no geo-spatial indexes - no full-text search A good place to get more information is http://www.mysql.com/why-mysql/white-papers/mysql-cluster-evaluation-guide/ . That guide also gives you some advice on scenarios where you *shouldn't* use MySQL Cluster. In addition, as you should expect, to get the best performance out of MySQL Cluster you may want to tweak your schema and/or application - you can get lots of tips from http://www.mysql.com/why-mysql/white-papers/guide-to-optimizing-performance-of-the-mysql-cluster/ 2. What are the steps to convert mysql to mysql-cluster. Basically, you need to backup your database (mysqldump), load it into a MySQL Server that's part of your Cluster (use http://www.clusterdb.com/mysql-cluster/auto-installer-labs-release/) to get your first Cluster up and running and then issue ALTER TABLE tab-name ENGINE=ndb; Appreciate the help. -- 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
-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 man...@tuenti.com Para: Miguel Gonzalez miguel_3_gonza...@yahoo.es 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 miguel_3_gonza...@yahoo.es 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: mysql cluster and auto shard
-Original Message- From: Mike Franon [mailto:kongfra...@gmail.com] Sent: 18 March 2013 13:34 To: mysql@lists.mysql.com Subject: mysql cluster and auto shard I am looking at the best way to scale writes. Either using sharding with our existing infrastructure, or moving to mysql cluster. Does anyone have any pros/cons to using mysql cluster? I am trying to find a much better understanding on how the auto sharding works? Is it true we do not need to change code much on application level? As a starting point, I think it's worth taking a look at this white paper... http://www.mysql.com/why-mysql/white-papers/mysql-cluster-evaluation-guide/ Most things will continue to work when migrating to MySQL Cluster but of course (as with any storage engine) to get the best performance you'll probably need to make some changes; this second paper explains how to optimize for MySQL Cluster - hopefully that will give a good feeling for the types of changes that you might need/want to make... http://www.mysql.com/why-mysql/white-papers/guide-to-optimizing-performance-of-the-mysql-cluster/ Thanks -- 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: MySQL Cluster Solution
Hi Neil, MySQL Cluster *does* support stored procedures. There are some limitation that MySQL Cluster has; this white paper would be a good place to start... http://www.mysql.com/why-mysql/white-papers/mysql-cluster-evaluation-guide/ Regards, Andrew. -Original Message- From: Neil Tompkins [mailto:neil.tompk...@googlemail.com] Sent: 07 March 2013 14:57 To: [MySQL] Subject: MySQL Cluster Solution Hi, I've used in the past MySQL Community Server 5.x. Everything is fine, however I'm now wanting to implement a new High Availability solution and am considering MySQL Cluster. However, I heard that MySQL Cluster doesn't support store procedures ? Are there any other restrictions I need to be aware of. Thanks Neil -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
Re: MySQL Cluster alerts
Hi Bheemsen, looks like a few different things going on there; if you have a MySQL support contract/subscription then it would be worth raising SRs - it doesn't need to be a bug, it's fine tyo ask questions too. A couple of things that spring to mind in-line I am frequently seeing the following alerts in our production MySQL Cluster environment. Do you have any metrics, guidelines and scripts to monitor and fix these alerts? Any help is appreciated. Temporary Tables To Disk Ratio Excessive Excessive Disk Temporary Table Usage Detected Table Scans Excessive Indexes Not Being Used Efficiently If you're using MySQL Cluster 7.2 then you should run OPTIMIZE TABLE for each of your tables (repeat that step whenever you make schemas changes to it, add an index or make very signifficant data changes). This will make the optimizer make better use of available indexes. Use the query analyzer in MySQL Enterprise Monitor (MEM) to see which queries are taking the time as these are likely to be the table scans (full table scans should be avoided as much as possible). You can use the EXPLAIN command to see if individual queries are making use of the available indexes. Try adding new indexes if they're missing for high-running transactions. Thread Cache Size May Not Be Optimal Cluster DiskPageBuffer Hit Ratio Is Low Note that you might observe this after restarting a data node as the cache must be repopulated as queries come in. If you're seeing this at other times or the MEM graphs show that the DiskPageBuffer Hit Ratio is consistently low then consider increasing it... http://dev.mysql.com/doc/mysql-cluster-excerpt/5.1/en/mysql-cluster-ndbd-definition.html#ndbparam-ndbd-diskpagebuffermemory -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql