Questions tagged [master-slave-replication]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
11
votes
2answers
25k views

Trying to understand SHOW SLAVE STATUS in MySQL

I have a Master-Slave replication setup and it looks like that it is running fine. Below is a result of SHOW SLAVE STATUS command: show slave STATUS\G; *************************** 1. row *************...
5
votes
3answers
4k views

MySQL Master/Slave replication on same VM instance?

I'm fairly new to databases so I hope this isn't a silly question! Is it possible to set up master/slave replication on the SAME server? I understand there are not any advantages to this in terms of ...
4
votes
2answers
16k views

PostgreSQL service start failed on CentOS 7

Installed PostgreSQL using: sudo yum install postgresql-server postgresql-contrib PostgreSQL version: 9.2.18 When start service: sudo service postgresql start Got error: Redirecting to /bin/...
4
votes
0answers
1k views

Queries running very slowly in Amazon RDS PostgreSQL read-replica

We have been maintaining a project which has both web and mobile application platform. The backend of the project is developed in Django 1.10 and deployed in AWS. At the beginning, when there were ...
4
votes
1answer
509 views

Can PostgreSQL slave server act as master for a new database?

My question is somewhat related to: https://stackoverflow.com/questions/19331577/does-postgres-replication-native-support-per-database-level-replication We have master-slave replication set up on ...
3
votes
3answers
1k views

In replication A->B->C, can A be binlog_format=STATEMENT and B be binlog_format=ROW?

I have replication setup between an on-prem MySQL 5.6 server (A) to another on-prem MySQL 5.6 server (B). I was setting up an AWS DMS instance (C) that I wanted to migrate and then replicate. It ...
3
votes
2answers
3k views

MySQL slave not able to execute long running update query

I am running a Master-slave replication servers of MySQL. As part of clean up of old data, i ran a delete query which deletes huge number of records from the database. It ran fine on Master server but ...
3
votes
2answers
189 views

MySQL chain replication timing of writes on first slave

With a MySQL chain replication setup, e.g. M1->S1->S2, what exactly is the order of operations for writing to the first slave? Is the binary log from the master simply streamed directly through ...
3
votes
1answer
410 views

Why does mysqldump stop the slave SQL thread for the entire backup?

I realized recently that I was using --master-data to dump a backup from a replication slave when what I really wanted was --dump-slave. After switching to --dump-slave, I see that mysqldump will stop ...
3
votes
0answers
398 views

Replication doesn't resume once it fails to connect

We have MySQL replication running for our application. Right now the slave fails to resume if it fails to connect to the server for some time. We get the error below: [ERROR] Slave I/O: error ...
3
votes
2answers
44 views

How do I create a MySQL slave server of a bunch of MyISAM databases on a master

I have a MySQL master server and slave became corrupt because of space issues on the master. Binary logs are potentially corrupt and I don't trust them. The databases are using MyISAM tables. I want ...
3
votes
0answers
6k views

Slave is not configured or failed to initialize properly. You must at least set --server-id to enable either a master or a slave

I am trying to setup multi source replication. In my slave I have defined following two properties in its configuration file. master-info-repository=table relay-log-info-repository=table These ...
2
votes
2answers
2k views

Post Mortem Analysis: PostgreSQL replication failed

We have a PostgreSQL 9.4.9 production server which was replicating to a slave instance, but today I discovered that the instance is out of sync! The obvious actions would be to recreate the slave, ...
2
votes
2answers
4k views

org.postgresql.util.PSQLException: ERROR: canceling statement due to conflict with recovery

I currently have a PostgreSQL slave node that is presenting problems, that don't arise in the master node. Seems to be related with the node sync process. Complete stacktrace: org.postgresql.util....
2
votes
1answer
82 views

Options for having same tables in 2 different data bases

I need to know what options I have for my next problem: I have 2 databases (sql server 2012) first for an ERP second for an website For the website's database, I want to use a table (customer) ...
2
votes
1answer
1k views

How does one scale out with master-slave replication?

To my understanding, a master-slave replication might be set up where clients can read from multiple databases. However, they can only write to the master. I believe this helps guarantee ACIDity. I ...
2
votes
1answer
373 views

Master-slave replication doesn't work on PostgreSQL 9.6

I tried to create a master/slave configuration with two servers and Postgres 9.6 I modified master and slave postgresql.conf in /etc/postgresql/9.6/main Same for master and slave: data_directory = '...
2
votes
1answer
798 views

MySQL Replication binary relay logs transfer too slowly

Master server MySQL 5.6.28 Ubuntu 14.04 8 core CPU Slave server Slave: MySQL 5.7.22 Ubuntu 18.04 16 core CPU Both of them have 64GB of RAM and plenty of disk space. What I did up to this ...
2
votes
1answer
2k views

Can I use MariaDB as a replication slave for MySQL?

I've been a MySQL user/administrator for many years and I've been considering a switch to MariaDB. We have a statement-replicated setup with a MySQL slave and I've been thinking that one way to ease-...
2
votes
1answer
1k views

how can be changed hot_standby parameter on postgres 9.6 aws/rds?

I have a postgres solution on aws/rds with a master and a read replica. master slave hot_standby on on transaction_read_only on on ...
2
votes
1answer
290 views

Fetch just inserted data in master/slave model?

Say I have MySQL master DB(used for updates) and corresponding Slave DB(used for reads). Now user inserts the data into MASTER through application(java), just after insertion he tries to retrieve the ...
2
votes
1answer
392 views

PostgreSQL replication not working after base backup

Last week we had an incident with our master PostgreSQL server instance which got totally thrashed so, we had to switch to our slave as our one and only DB instance. After the initial chaos was ...
2
votes
0answers
23 views

How I can find out which postgresql I am connected into when behind a load balancer?

I have the following database replication setup: As you can see I do a master-slave replication and I use aload balancer in order to connect into read-only replicas. So I want to test this setup, ...
2
votes
2answers
259 views

Change user password on slave

Our users can only access the slave database. How can I let them change their passwords on their own or when their passwords expire?
2
votes
0answers
147 views

How to get the Slave commit timestamp using MySql replication?

I've been looking for ways to collect information about the replication delays on MySql 8. I found an alternative solution, but I imagine there's a more straightforward way to do that. By reading its ...
2
votes
1answer
333 views

Mongodb replica set primary and secondary node conf fail when one slave is down

In my env, I had created MongoDB replica set conf for high availability so one server fails should be handled by other also in my conf I have 3 DB server and 1 arbiter too but, my slave's server ...
2
votes
1answer
104 views

Can I stop replication of create/drop index statement on one slave of Mysql 5.6?

I have this cluster where master and slave uses same indexes but one of the slaves has some extra indexes (large machine which runs some analytics queries). So I have to maintain two sets of indexes. ...
2
votes
0answers
509 views

Cluster using docker

We are creating a new application using microservices, and for that we would like to be able to raise database instances just like we raise new instances for the application's microservices. We do not ...
2
votes
2answers
1k views

Importing a large mysql dump while replication is running

So we have a simple master/slave mysql replication running between two CentOS Servers. The master has multiple databases. eg.. Database1 Database2 Database3 The issue is we have a mysql dumpfile ...
2
votes
0answers
61 views

Fault tolerant cross datacenter MySQL replication & failover strategy [duplicate]

Which of the following method is the most fault tolerant way to achieve cross datacenter MySQL replication using DNS failover and why? MySQL master-master replication with one primary/active node and ...
1
vote
3answers
1k views

Select from slave and insert into master in MySQL

Because of pressure on my servers and variety of applications on my servers I was wonder if can I have application or proxy to select from slave database and insert into master. I'm using PHP/Laravel ...
1
vote
1answer
24 views

Is it possible to configure pgbouncer to distribute queries among master and slave?

We have master (write-read) and slave (readonly) Postgres 10 databases. Slave is online replication from master. Now our application (c# webapi) connects to master only directly. We want to execute ...
1
vote
1answer
1k views

MySQL Replication Slave Status OK but Data inconsistent

We are using MySQL 5.7, and have a Master and 3 Slave servers replication setup. All the 4 servers are dedicated for MySQL use only, and belong to the same data-center, connected over Private Network. ...
1
vote
1answer
43 views

Does pg_export_snapshot work across replicas?

This is probably of little importance, but it's possible in PostgreSQL to retrieve the transaction snapshot with pg_export_snapshot and restore it with set transaction to start a second transaction ...
1
vote
1answer
69 views

Howto reliably ship WAL log files between master and slave

I have a replication master and a slave on two different computers. Actually both databases are running in docker containers, and their WAL archive directories are exposed to the host machine using ...
1
vote
3answers
602 views

Seconds_Behind_Master high even though Read_Master_Log_Pos and Exec_Master_Log_Pos are very close

From what I understand from https://dev.mysql.com/doc/refman/5.7/en/show-slave-status.html, seconds_behind_master is the difference in the timestamp of where the IO thread is currently writing in the ...
1
vote
2answers
788 views

Need help with Master Slave Replication

I want to set up a Master-Slave Replication. Therefore I followed the MySQL manual. Once I was I wanted to test it. I've let me show the slave status with was as following; Slave_IO_State: Waiting ...
1
vote
2answers
64 views

MYSQL DATABASE BACKUP

Currently my backup strategy invloves :- 1)I have one master server and two slaves (Data approximately 700 GBs and tables are of mixed innodb and myisam). 2)I take weekly and monthly backup from ...
1
vote
1answer
3k views

How does trigger file in recovery.conf work?

Can someone explain how the trigger_file in recovery.conf works? As far as I know the standby server will become the primary server when it detects the trigger_file. But how will the trigger_file be ...
1
vote
1answer
25 views

Percona 5.7.24 : How to fix disk slave storage full

I find that my slave disk is full, but I don't understand what makes it full. Can anyone help me explain what this file is? And how it is formed, so that it makes lots of files that make storage full. ...
1
vote
1answer
42 views

Master mysq8 slave Mariadb 10.3 Error 22

Master (mysql Ver 8.0.16) Slaventer code heree (mysql Ver 15.1 Distrib 10.3.15-MariaDB) I have this error Error 'Character set '#255' is not a compiled character set and is not specified in the '/...
1
vote
1answer
600 views

MySQL replication works but slave keeps reconnecting to master

I have a master-slave set-up with multiple slaves in different datacenters. One of the slaves stopped working normally today. This was easily resolved by restarting mysqld but ever since (and perhaps ...
1
vote
1answer
78 views

Master-Slave semi circle replication not working in MySQL

I didn't know how to describe it so I am calling it semi circle. Here's what I am doing. Server A Server B = This is slave of Server A Server C = This is slave of Server B When I update something ...
1
vote
3answers
34 views

Mysql master-slave config in my.cnf

I'm following this guide to setting up a master-slave config (https://support.rackspace.com/how-to/set-up-mysql-master-slave-replication/) and i'm confused about the end of the document where they are ...
1
vote
0answers
19 views

RESET MASTER; does not reset GTID_EXECUTED

I'm trying to get replication up and running between two kubernetes pods, and am getting the dreaded @@GLOBAL.GTID_PURGED can only be set when @@GLOBAL.GTID_EXECUTED is empty. error. root@central-vm:~...
1
vote
1answer
33 views

MySQL 5.7 Can slave be ahead of master during replication

From my understanding, once commit() is received from client, transactions are written to binlog first before any commit is done to InnoDB. In this case, is it possible for slaves to be ahead of ...
1
vote
2answers
34 views

Split read/write requests over different read/write datasources

Recently I have run some performance tests on the application I work on, and it turns out that it didn't do really well ( the problem is mainly between the back and the DB). So as investigating the ...
1
vote
1answer
200 views

Issue with Time Zone while migrating MySQL on-premises DB to AWS RDS

I am having MySQL 5.6 database with PST time format in on-premises server. Now we are willing to migrate the database to RDS. For this, we have taken backup from physical server and restored in RDS ...
1
vote
1answer
252 views

global foreign_key_checks = 0 on RBR slave

Example schema: CREATE SCHEMA account; CREATE TABLE `user` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `name` VARCHAR(50) NULL DEFAULT NULL, `address` VARCHAR(50) NULL DEFAULT NULL, ...
1
vote
1answer
130 views

PostgreSQL - Replica Recovery Process Stuck frequently (epoll_wait taking too much time)

We have Master Slave Setup with Asynchronous Streaming Replication (Replication Slots). Frequently our Replica's entire Postgres processes seems to be doing nothing (or stuck?). Since ...