6

There are multiple reason why you wouldn't want to do multimaster replication in a circular fashion, but most of them can be summarized in one: You will have 3 different single points of failure. Check this article (which is exactly what you asked for, but probably not what you want). Standard replication is very prone to drifts in data, as it is ...


6

If you want to erase all binary logs older than 30 minutes, do this mysql> PURGE BINARY LOGS BEFORE NOW() - INTERVAL 30 MINUTE; If you want to erase all binary logs except the last one, do this mysql> PURGE BINARY LOGS BEFORE NOW(); If you want to erase all binary logs before midnight, do this mysql> PURGE BINARY LOGS BEFORE DATE(NOW()) + ...


6

At this point, I guess SQL Server with an AlwaysOn cluster will satisfy HA, but what about read/write? I think this SQL Server 2012 whitepaper will be a good read for you at this point to get a feel for what's possible with the two different features (Availability Groups and Fail-over Clustered Instances) that come under the AlwaysOn brand name. Deploy ...


4

On a basic level, yes. Just set up the current Master like you would any normal slave database. However, there are some things to consider first. Is the second slave set to READ-ONLY, as you want to avoid writing to both masters at once. You probably want to set auto_increment_increment=2 and auto_increment_offset=1 on the first master, and ...


3

If wsrep_local_state_comment, wsrep_ready, and wsrep_connected show the correct values, then that particular node is good. There's no Seconds_Behind_Master equivalent, because Galera is synchronous -- a healthy node can't be lagging, by definition and by design... a slow node slows down all the others, it doesn't lag behind them.


3

When using Master-Master Replication Setups (a.k.a Circular Replication), we tend to take things for granted. There are two aspects worth mentioning: ASPECT #1 : PRIMARY KEY COLLISION You mentioned primary key collision. That will definitely happen if you write to the same table on both Masters within the same window of time and that table has an ...


3

I see at least two options: if you don't need near-real-time replication, but just once a day (or maybe every hour) is enough for you, and the amount of data is small, you can quite simply create a script that will run in each remote location: connect to the local database do a dump of the local data (pg_dump --data-only should be fine) connect to the ...


3

Yes, you are correct. This relies on the server ID being set correctly in the standard MySQL configuration. In MySQL 5.6 and above you can configure the server to use GTIDs (Global Transaction IDentifiers) and they are used on all servers to determine if transactions need to be executed or not


2

Rotate logs: mysql> FLUSH LOGS; [Re]move the old binary logs, all except the latest it's safe to remove.


2

I have dealt with Circular Replication with three nodes before. Here are my posts: May 07, 2012 : Setting Circular Replication in mysql (From Scratch) Sep 24, 2012 : Setting up MySQL circular replication in existing replication topology? (Takes a Master with Two Slaves and converts the topology to Three-Node Circular Replication) I remember a client I used ...


2

I agree with previous answer from Jynus. MariaDB is pretty straightforward to install and there are many how to topics to do inplace replacements of MySQL (You dont need to worry much, all the utilities and commands you know are the same) For example, from MariaDB site itself MariaDB Upgrade. You can also simulate a MariaDB/Percona/MySQL configuration with ...


2

As you already have a running Master-Master replication, here a tip for the load balancer: I use HAProxy It is a free software balancer, needs very less system resources and is quite easy to configure. A tip: Install 2 loadbalancers with keepalived or keep in mind that you just created a critical bottleneck. I use the setup keepalived + 2x haproxy + 2x ...


2

Yes you can, simply add replicate-ignore-table in your my.cnf . please refer following link for mysql documentation : https://dev.mysql.com/doc/refman/5.5/en/replication-options-slave.html#option_mysqld_replicate-ignore-table


2

The SHUTDOWN privilege can only be used when running mysqladmin Apr 22, 2013 : /usr/libexec/mysqld: Normal shutdown, but my team doesn't do that? Mar 06, 2013 : How to properly kill MySQL? Feb 28, 2013 : mysql restart won't kill child processes on CentOS Taking away SHUTDOWN grant will stop users from running mysqladmin shutdown. Your Actual ...


2

The problem lies in enabling the slaves on your SQL Node 2 in each datacenter. MySQL Cluster does support Multi-master replication as seen in the first diagram on the documentation page. Notice how only one SQL node in each cluster participate in the circular replication topology. And the duplicate issue is referenced in the quote from this page on setting ...


2

Looking at you config, it seems you are missing log-slave-updates in your my.cnf files. You will need to add this in to both masters my.cnf files and restart them. This tells the slave database to take anything it receives from it's master, and copy from the relay log to the binary log so it can be replicated onwards. e.g. Master 1 Updates a table. It ...


2

I am glad you were able to mysqldump 1.5TB database. You are sure patient. Now for the reality check. You will some downtime for reboots and pausing. No need to mysqldump anymore. STEP 01 Did you put this line in /etc/my.cnf on both Master1 and Master2 ? log-slave-updates If you not sure, run this on both Master1 and Master select @@global....


2

When running an intermediary replication that is also a master, log-slave-updates needs to be enabled to ensure that the upstream master, replicates to the downstream slave.


1

To answer my own question, the "fix" is to change binlog_format to STATEMENT. It was previously MIXED. Not entirely sure of the reason behind this - MySQL should be intelligent when using MIXED mode about what is replicated as statement and what is replicated as row.


1

Auto Increment ID is "replicating" to the slaves. Otherwise it would be hell of a job to promote a slave to a new master if the status of auto increment needs to synced. So to answer your question it would start from 8. If you do not write actively to both master at the same time you don't need to do any auto_increment_* settings trickery. These settings ...


1

I don't think so Single Slave with Multipe Master Possible. As per MongoDB BOL Here Master-slave replication preceded replica sets and made it possible to have a large number of non-master (i.e. slave) nodes, as well as to restrict replicated operations to only a single database; however, master-slave replication provides less redundancy and does not ...


1

Master-Master has potential problems. If you have AUTO_INCREMENTs, they need to be configured correctly. If there is a chance of "duplicate key" for other reasons, that will stop replication. Hence, I recommend not writing to both Masters. Instead write to only on, keeping the other one as a 'hot backup'. Consider Galera.


1

MySQL Server master-master replication is possible for max 2 nodes. You might want to use Galera Cluster (Percona Xtradb Cluster or Mariadb Galera cluster) Or Oracle's NDB Cluster to achieve HA as a better solution than master-master.


1

1 Stop the slave on the first master mysql> STOP SLAVE; If the second master becomes a read only then the first master should no longer replicate from it. 2 Change the 2nd master's configuration to read only. mysql> SET GLOBAL READ_ONLY=1; Add read_only=1 to my.cnf for the next restart Read Only variable 3 Unlock the tables on the second ...


1

This information applies to BDR 0.8 and older; in BDR 0.9 the configuration method has changed. If the local database name is not the same as the database name specified in the _dsn parameter for a node's connection to its upstream, you must specify it with the _local_dbname connection option. See the wiki entry I just added for this parameter, which wasn'...


1

PXC (and other Galera solutions) require one network hop at COMMIT time. If your application can combine writes into a single transaction, that will help at some level. However, still each COMMIT will take 300ms (or whatever it is). Regular MySQL can do Master-Master and have both writable. That replication is asynchronous. However, there are a number ...


1

I don't have experience of your exact situation, but could you use: auto_increment_increment=3 auto_increment_offset=1 [then 2 and then 3] on your different masters, so that each one generates a different set of id's. e.g. server 1: 1, 4, 7 server 2: 2, 5, 8 server 3: 3, 6, 9


1

You can try following method Flush tables with read lock on master(It will lock the master) show master status use this position accordingly in change master to command unlock tables(It will unlock master) Hope it helps.


1

I solved this problem by made separate syncs i.e. host1->host2 host2->host3 host3->host1 And, for resurect from "stalled" status, made cron's script that check db status and sync status and activate it.


1

The biggest caveat with only 2 machines in a cluster is the possibility of "split-brain", in which the nodes lose communication with one another, and each assumes that they are now the Master, possibly getting out of sync with the other. This risk is mitigated if you can absolutely ensure that writes will not go to the 2 Masters separately while they are ...


Only top voted, non community-wiki answers of a minimum length are eligible