9

Relay_Master_Log_File is actually the name of the binlog on the master containing the last SQL statement successfully executed on the slave. It is not the name of a relay log on the slave. See: http://dev.mysql.com/doc/refman/5.5/en/show-slave-status.html Exec_Master_Log_Pos is the position in the relay_master_log_file that the slave SQL thread has ...


6

It's possible, why not. You have to run two instances of MySQL. One will be a master, second - a slave. Check this for detailed instructions https://dev.mysql.com/doc/refman/5.5/en/multiple-servers.html UPDATE: Usually I use Vagrant for this. Here's a piece of code to setup a master + slave. Vagrantfile: Vagrant.configure(2) do |config| config.vm....


6

Based on this I'd say you didn't have enough wal_keep_segments on the master, weren't using a replication slot, and either had hot_standby_feedback off or had the connection drop for long enough for the master to remove needed WAL. And you are presumably not using WAL archiving (archive_command on master, restore_command on replica) as fallback. So the ...


4

STATEMENT → ROW is absolutely a valid configuration. The thing you've probably overlooked is that Server B needs log_slave_updates enabled, or it won't replicate anything from A to C. But to address the question at hand, consider the following table, which describes the comparison between configured @@binlog_format and what is actually written to the ...


4

What you see is a common experience for anyone running standbys and bigger queries on the master. There are a couple of possible causes: There are also additional types of conflict that can occur with Hot Standby. These conflicts are hard conflicts in the sense that queries might need to be canceled and, in some cases, sessions disconnected to ...


3

What you're looking for is Transactional Replication. It allows you to replicate specific objects from one database to another.


3

You need to stop replication, make the Slave have the same specs as the Master, then start replication. Make sure the Slave has no incoming connections. Otherwise, that will make the SQL thread on the Slave compete with incoming connections that are running SELECT queries against the same table you are running DELETE. If you cannot reroute the incoming ...


3

You have 3 steps before being abble to connect to a PostgreSQL Database: Install PostgreSQL Create the data cluster ($PGDATA) Start the server You already installed PostgreSQL, you need now to create the cluster. The initdb tool is what you need. You will find documentation here. It might be confusing because when you're under a debian based distros, apt ...


3

You can use pt-table-checksum and pt-table-sync to fix the data mismatch between the master and the slave. Here's a blog post for further reference: https://www.percona.com/blog/2015/08/12/mysql-replication-primer-with-pt-table-checksum-and-pt-table-sync/ It is possible that an update went to the slave directly instead of the master. It can also be with the ...


3

pgBouncer cannot do that, and indeed it is a questionable feature. How can you reliably tell that a statement like SELECT pg_create_physical_replication_slot('aname'); won't modify your database? There is pgPool which boasts such a feature, you might investigate it. The better technique is usually for your application to use two database connections: one ...


2

Dangerous. Read about "Critical Read". If you blindly send all SELECTs to a Slave, you could screw up transactions on the master. Or you could miss data when replication is "behind". Instead, modify your application to connect to either the Master or to some Slave, based on whether it is safe to get the data just from a Slave.


2

In the primary side, you have to use the view pg_stat_replication and compare differents fields to see the drift. The function pg_xlog_location_diff give the drift in size : select pid, client_addr, state, sync_state, pg_xlog_location_diff(sent_location, write_location) as write_lag, pg_xlog_location_diff(sent_location, ...


2

Personally, I am not comfortable with different binlog_format settings between Master and Slave (See my old post from 1.5 years ago MySQL v5.1.73 - can the binlog_format betweem Master & slave be different?) In your particular case, I would make the Slave STATEMENT or the Master ROW. You could probably get away with MIXED on the Slave. If the Slave is ...


2

To answer this, you need to understand the way MySQL replication works and the difference between the IO_thread and the SQL_thread. In a nutshell, the IO_thread pulls events from the master and stores in the relay_log. The SQL_thread pulls from the relay_log and applies them to the slave dataset. So, the description of --log-slave-updates (emphasis mine): ...


2

Use full path for keyfile. Don't use ~ -character there. Your mongod is started (probably) with user 'mongod' and that user don't have home directory. Additionally keyfile must be have chmod 0400 and ownership same than user who run mongod process (mongod).


2

Any reliable failover scenario requires a third party, sometimes called a "witness", "arbitrator", "cluster monitor", "cluster manager" etc. to detect failure of one member and initiate a failover. This process ideally resides on a network separate from the one that connects cluster members to each other. It "pings" node(s) that are deemed to be masters or ...


2

I have to keep my answer very generic as you have not mentioned any particular database system and what type of master slave implementation you want to know about. However, they can only write to the master. True in most cases but there are solutions where you can write to more than one target at the same time. Your data will be replicated to both nodes, ...


2

Am I missing something here ? sure, just few row above: For example, DDL statements such as CREATE TABLE and ALTER TABLE are always logged as statements, without regard to the logging format in effect, so the following statement-based rules for --binlog-do-db always apply in determining whether or not the statement is logged.


2

The reason why it didn't change anything is that your config have "protocolVersion" : NumberLong(1) and this heartbeatTimeoutSecs applies only when protocolVersion is zero (0). You should use settings.electionTimeoutMillis wich description you can find here.


2

I'd use streaming replica "out of the box". It will restart itself after a network hiccup just fine. If you are afraid the WAL will get recycled before it is streamed, use a replication slot to prevent that from happening.


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.


2

I just tried it, and it is not possible, because exported snapshots are not replicated. Snapshots are persisted in the pg_snapshots subdirectory of the data directory, and you will see that they don't show up on the standby.


2

Replica sets in MongoDB are designed for data redundancy and failover, so all data-bearing members of a replica set currently contain the same databases & collections as at MongoDB 4.2. A member with a partial data set would not be able to fulfil either of these key design goals for a replica set deployment. There is a relevant server issue you can ...


2

This could be a serious problem when replicating between MySQL 8.0 and MariaDB 10.x. The default (for good technical reasons) COLLATION for the 8.0 is utf8mb4_0900_ai_ci. Note the "255" associated with it. MariaDB has not yet adopted the Unicode 9.0 collations. Furthermore, Oracle (MySQL 8.0) did a major rewrite of the collation code, thereby possibly ...


2

VMs are fine for testing, performance overhead exists but it is at most 30% under high load, not orders of magnitude. If you want to run multiple database instances on the same machine, what you are looking for is mysqld_multi. You should probably avoid it, though, it is a terrible, messy solution. VMs are a better approach. Or containers if you really feel ...


2

This looks like a non-issue, because, obviously, you will be using the same table definitions, including engine, on both servers. The example in the MariaDB Knowledge Base article you linked to has different storage engines: the slave server doesn't have InnoDB, so it defaults to MyISAM, which doesn't support foreign keys. MyISAM does tolerate foreign key ...


2

You should consider what distance does to any DB connection. I have some posts from myself and others on this subject Jul 25, 2012 : Mysql database replication on different vlan/subnet/another site (From Me) Aug 26, 2012 : Mysql database replication on different vlan/subnet/another site (Shlomi Noach) Aug 20, 2012 : Best solution for cross-datacenter MySQL ...


1

Plan A: Can you avoid updating that table entirely? If so, the Slave can be configured to have replicate-ignore-table on the Slave. If it is an entire database (or could be moved to be such), then you can use the more efficient binlog-ignore-db on the Master. Caveat -- If that table is needed on the Slave, well, it won't be there (or at least not up to ...


1

I'm interpreting your scenario as follows: You start with one master database and two replicas; both replicas are replicating from the master. During the promotion, you want to set the original master to replicate from the promoted replica. The second replica you leave alone to continue replicating from the original master. The command RESET SLAVE on a ...


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