Questions tagged [master-slave-replication]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
11
votes
2answers
27k 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
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 ...
4
votes
2answers
20k 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
2k 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
559 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
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
5k 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....
3
votes
2answers
206 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
465 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
427 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
45 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
1answer
83 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
3answers
759 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 ...
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
114 views

Master mysq8 slave Mariadb 10.3 Error 22

Master (mysql Ver 8.0.16) Slave (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 '/usr/share/...
2
votes
1answer
639 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
1k 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
382 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
596 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
28 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
330 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
214 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
547 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
166 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
514 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
73 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
2k 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
2answers
29 views

MySQL replication master-slave

I'm learning master-slave replication with MySQL and I could get it to work and also use the Percona backup tool to restore a slave. I learnt from this project https://github.com/vbabak/docker-mysql-...
1
vote
1answer
279 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
2k 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
83 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
94 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
1answer
2k views

Service mongod fails after adding security.keyFile in config file

My mongo.conf: # where to write logging data. systemLog: destination: file logAppend: true path: /var/log/mongodb/mongod.log # Where and how to store data. storage: dbPath: /var/lib/mongo ...
1
vote
2answers
957 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
68 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
27 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
130 views

Replication of databases with specific prefix on master

There are options to dynamically set variables on replication slaves, like replicate_wild_do_table and replicate_wild_ignore_table. But, are there any options for replication master to dynamically set ...
1
vote
1answer
686 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
83 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
0answers
32 views

Getting error while starting slave on MySQL slave./ Backups in MySQL 8.0.20

I want to set up below command for daily MySQL database backup.suppose We have more than 50 MySQL database in server. I am using below command to take backup of all databases on server. Note: I am ...
1
vote
1answer
22 views

SLAVE off when loading data into the MASTER from another database

I have an active MASTER/SLAVE replication (Mariadb 10.2) with a single database (see scenario 1) I decided to add in IMPORT database to populate the MASTER database as described in scenario 2. ...
1
vote
0answers
37 views

How to check RDS MySQL database synchronization status

We were creating a read replica for an RDS MySQL (5.7.28) instance, and before the read replica became available one of our developer accidentally connected to the read replica and was able to write ...
1
vote
1answer
20 views

Can a MySQL 5.6 master replicate to a 5.7 slave, which in turn replicates to a MySQL 8 slave?

According to the docs, "MySQL supports replication from one release series to the next higher release series. For example, you can replicate from a master running MySQL 5.6 to a slave running MySQL 5....