8

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 ...


8

I want to understand further is the Relay_Log_File, Relay_Log_Pos and Relay_Master_Log_File. From SHOW SLAVE STATUS\G, get two values Relay_Log_File : Current relay log accepting new entries during replication Relay_Log_Pos : Current position of the current relay log accepting new entries during replication Relay_Master_Log_File : Relay log file containing ...


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 ...


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

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.


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 ...


1

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).


1

In general (until very recent versions), it is better to make the Slave the beefier machine. Originally, you could easily run queries in parallel on the Master, but they would be run purely sequentially on the Slave. If the system is busy enough, the Slave could get behind. Later versions have changed to RBR and added some parallelism on the Slave. Also, ...


1

S1 is both a Slave (to M1) and a Master (to S2). That is, M1 and S2 have no knowledge of each other. A client writes to M1. M1 writes to its binlog and simultaneously sends data to S1. S1 writes to its "relay log" using its "I/O thread". S1's "SQL thread" eventually (usually quickly) reads the relay log and acts mostly like it was a write from some client -...


1

Your base backup looks old as current master (earlier slave) must be on timeline greater than 1 after getting promoted as master but your slave is on still timeline 1. You can either create a new slave from scratch after taking a new base backup from new master. Or you can try timeline switch in the current non replicating slave (not sure about it) refer it ...


1

It turns out my slave's server_id was too long. I was naming these after the slaves' public IP addresses, and this IP was longer than the max value of 4294967295. I should have checked when I decided to use this naming scheme, but a warning from MySQL would also have been nice. All's well that ends well. I now use the last three decimals of the public IP ...


1

-I think the Bind-Address in the my.cnf can be set to 0.0.0.0 or <Servers_ip> -From what I understand your replication never once worked? Your master is sending the files to the salve I see that in the Last_SQL_Error: Error 'Unknown table ... So what the problem is with the configuration of the salve reading the log or you did not dump the database ...


1

On the Slave: stop slave reset slave On the Master reset master On the Slave start slave show slave status If you can include info like which version/flavour of MySQL and OS you are using that will help people responding to your query.


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