Questions tagged [master-slave-replication]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
12
votes
2answers
29k 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
22k 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
566 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
4k 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
209 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
493 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
436 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
7k 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
3answers
2k views

SELECT from slave and INSERT into master in MySQL

I'm using PHP/Laravel and MySQL databases. Briefly, I want to use slave databases for reads and master database for writes. What Laravel config, Laravel package, or database tool do you suggest to ...
2
votes
1answer
84 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
2answers
29 views

What is the maximum latency / distance mysql replication can tolerate without having errors or wrong data?

I have two machines in a master - slave replication. I want to know if they are in two seperate places e.g. London, England and Tokyo, Japan are there going to be any latency issues. What exactly is ...
2
votes
3answers
822 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
159 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
701 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
451 views

Why has deadlock behaviour changed between MariaDB 10.1.22 and 10.2.14?

Since upgrading MariaDB 10.1.22 to 10.2.14 our MariaDB slaves are encountering deadlocks that are not handled in less than 600 seconds thus the classic semaphore decision to crash the server. The ...
2
votes
1answer
1k views

mariadb Unknown system variable 'server_uuid'

Im trying to setup replication between mariadb(10.1.31-MariaDB - MASTER) and mysql(5.7.12-log - SLAVE). After executed the start slave, I got the below error. Fatal error: The slave I/O thread ...
2
votes
1answer
3k 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
415 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
655 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
1answer
25 views

MariaDB - Replication - Unable to login remotely

So I've been trying to configure MariaDB replication for our server. Unfortunately I cannot get it replicating correctly. So I've followed the MariaDB guide to the letter to get replication set up. ...
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
365 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
277 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
607 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
188 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
1answer
154 views

Cross-Continent SQL High-Latency Data Synchronization

How would one go about synchronizing a MySQL database cross-continent, while keeping the distributed application using the DB running fast (<0.2s page loads) ? My database contains about 2.5GB of ...
2
votes
0answers
218 views

MongoDB not performing well when set Read from secondary

I have a mongoDB database, with 1 primary and 1 secondary in replicaset(and 1 arbiter). Both the servers are hosted on aws on c4.2xlarge instances(with 1.5 TB of SSD on each). Mongo version of primary ...
2
votes
0answers
516 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
78 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
2answers
38 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
481 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
110 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
97 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
3k 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
1k 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
75 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
144 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
2 3 4 5