Questions tagged [mysql-replication]

Replication enables data from one MySQL database server (the master) to be replicated to one or more MySQL database servers (the slaves).

Replication enables data from one MySQL database server (the master) to be replicated to one or more MySQL database servers (the slaves). Replication is asynchronous - slaves need not be connected permanently to receive updates from the master. This means that updates can occur over long-distance connections and even over temporary or intermittent connections such as a dial-up service. Depending on the configuration, you can replicate all databases, selected databases, or even selected tables within a database.

The target uses for replication in MySQL include:

  • Scale-out solutions - spreading the load among multiple slaves to improve performance. In this environment, all writes and updates must take place on the master server. Reads, however, may take place on one or more slaves. This model can improve the performance of writes (since the master is dedicated to updates), while dramatically increasing read speed across an increasing number of slaves.

  • Data security - because data is replicated to the slave, and the slave can pause the replication process, it is possible to run backup services on the slave without corrupting the corresponding master data.

  • Analytics - live data can be created on the master, while the analysis of the information can take place on the slave without affecting the performance of the master.

  • Long-distance data distribution - if a branch office would like to work with a copy of your main data, you can use replication to create a local copy of the data for their use without requiring permanent access to the master.

519 questions
0
votes
1 answer

How to fix MySQL 8 replication error 1062 after system reboot?

after a system reboot my replication stopped suddenly. So I'm trying to bring the slave back to the most current state. To do this I create a dump from the master's database and import it on the slave, like mysqldump --host=MASTERADDR --port=MYPORT…
Lars
  • 135
  • 5
0
votes
1 answer

Real time synchronization of databases with different data structure

I'm rewriting a legacy web application. At some point in time, I want old and new app, to work in parallel, on databases with different structure (both mysql). The troublesome part is that the databases needs to be synchronized, preferably in real…
0
votes
1 answer

Is it possible to manage read/write requests on AWS RDS?

We are planning to create a read replica on our MySql Database on RDS but we want to manage this on AWS. Does AWS has a solution that manages requests and redirect them if write to the master otherwise to the read replica?
xxlali
  • 51
  • 3
0
votes
0 answers

MySQL replication fails with connection error when server has second IP address

For a few days I've been struggling with a MySQL + Docker + ClusterIP problem. I'm trying to create a failover for my servers. If Server1 fails, Server2 should take over automatically. Both servers are running MySQL 8.0.31 in a Docker container.…
Lars
  • 135
  • 5
0
votes
0 answers

MariaDB replication lagging up to a dozen times a day for no obvious reasons

We first set up MariaDB replication using less powerful servers but considering our increased database load we had to rent more powerful servers and that's when the troubles began. Right now the replication between the master and slave occasionally…
0
votes
1 answer

Promote to Master a MySQL slave that has its own slaves

MySQL standby & chained replication Having the current setup (not using GTID) (see link to image): PRODUCTION NODES: MASTER (A) -> SLAVE (A1) + SLAVE (A2) STANDBY NODES: -> SLAVE (B) (with log_slave_updates enabled) -> SLAVE (B1) + SLAVE (B2) The…
MGS
  • 1
  • 2
0
votes
1 answer

RHEL8.4 with Percona8.0.29 - Cluster fails error code 7

I have installed 3 x RHEL 8.4 Servers and have also installed the latest version of Percona XtraDB Cluster. I have left the my.cnf file pretty basic, wsrep also basic with just the required changes to node name, gcomm addressing and cluster…
CliveG
  • 1
  • 1
0
votes
1 answer

Running MySQL server as slave for one DB and master for another

I have two MySQL server having master-slave replication for DB1. The slave server holds DB2. Because the slave server is not so powerfull I want to run analytics upon DB2 on the third server. Is it possible to have such setup?
Ralfeus
  • 121
  • 1
  • 1
  • 6
0
votes
1 answer

What should be in mysql replication MASTER_HOST='source_host_name'

I am trying to setup replication across two servers on AWS. I am following the documentation and I am up to this point. https://dev.mysql.com/doc/mysql-replication-excerpt/5.7/en/replication-howto-slaveinit.html This is given. mysql> CHANGE MASTER…
user1794918
  • 103
  • 5
0
votes
1 answer

Different bin log file index on maria db galera nodes

Setup: Galera Cluster with 3 nodes running in Docker Containers. In front of every node is a maxscale proxy. Remotely is a replication slave running with bin-log replication where the cluster is acting as the master (behind the maxscale proxy).…
0
votes
0 answers

MySQL Replication Master => Slave => Master

I have set up MySQL master-slave replication successfully. But I realized it doesn't work if I would like to simulate the real-world case. Here is my scenario: Make sure the data have been fully replicated to Salve from Master. Shutdown the…
ITnewbie
  • 171
  • 2
  • 9
0
votes
0 answers

Ubuntu 20.04 mysql-server 8 replication does not start

I am building a master-master replication with two servers which are talking to each other by local lan. I have: Server 1: mysql -uroot -p change replication source to source_host='192.168.1.3', source_user='repl_user',…
Foxina
  • 1
0
votes
1 answer

MYSQL: Many slave servers with smaller resources or less with larger resources

I want to create High availability with Master Slave replication (for Select query). I am wondering which one is better: Having smaller resources slaves but more servers or Having larger resources slaves but less servers I only use One Master for…
0
votes
0 answers

2 servers, 2 databases on each, 1st server 1st db master and 2nd slave, 2nd server 1st db slave, 2nd master, is it possible?

I have 2 MySQL/MariaDB servers each of them with its own database and I would like to set up a continuous backup on each other via replication. Is it possible to make 1 DB master and 1 slave on each one of the servers? Server 1 Server 2 db1…
Eugene
  • 119
  • 5
0
votes
1 answer

Error 'Character set '#255' is not a compiled character set and is not specified mySQL

Okay, I've hit a brick wall and have run out of ideas. Master: 8.0.25-0ubuntu0.20.04.1 Slave: 5.7.33-0ubuntu0.16.04.1-log Getting error with show slave status\G: Last_SQL_Errno: 22 Last_SQL_Error: Error 'Character set '#255' is not a compiled…
Aninemity
  • 73
  • 2
  • 9