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.

514 questions
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
  • 151
  • 1
  • 6
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
0 answers

MySQL replication warning "Automatically adding IPv4 localhost address to the allowlist. It is mandatory that it is added."

I have a MySQL 8.0.27 InnoDB cluster running on three Ubuntu 20.04 servers. Everything's working fine, but when MySQL starts I get these warnings in MySQL's error log: 2021-12-07T21:26:47.858979Z 2 [Warning] [MY-011735] [Repl] Plugin…
jetboy
  • 882
  • 2
  • 11
  • 25
0
votes
0 answers

How to ignore DATABASE.TABLE SQL queries in binlog in MySQL for the databases I don't want to replicate

I set up replication for 1 database with binlog_do_db setting. But there are some queries like: USE replicated_db; DELETE not_replicated_db.table; Which breaks replication (with an error about not_replicated_db is not existing on the slave) How I…
Eugene
  • 119
  • 5
0
votes
0 answers

How do you set up MySQL master-master replication for my digitalocean host and my laragon localhost?

I created a Laravel web application on my computer using Laragon, then hosted it on Digital Ocean and it works fine. Now, I am supposed to implement a Mysql master-to-master replication for my "digitalocean" database, and my second master, I want it…
0
votes
0 answers

MySQL group replication with no downtime

Simple question - I have a server running MySQL and need to set up group replication. Can't afford downtime. How can one set up a mysql group replication on a running mysql server? (the other servers have all software installed, just the DB isn't…
Peter
  • 1
0
votes
0 answers

SSL/TLS connection with onPremise MySQL Database

I'm trying to use SSL/TLS to encrypt the replication from an on premise MySQL database to a Google SQL Replica instance - This is the error I get.... "error": { "code": 400, "message": "Invalid request: CA certificate in onPremisesConfiguration is…
Eggely
  • 11
  • 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
  • 1
  • 9
0
votes
1 answer

keepalived delay before bringing ip up

Is it possible to configure a delay before bringing the virtual IP up in keepalived? Background: I have multiple Master/Master MySQL Setups. Only one Master is used at time. Keepalived is used for VIP that is used for mysql traffic. When the VIP is…
0
votes
2 answers

Mysql Server, with Mariadb Slaves, disk usage high and many binlog files

I have a Mysql Master server and a few MariaDB slaves connected to it. I have an issue in that my disk usage on the slaves have gone a bit mad. My master server is 163GB with bin log files of 100Mb each ranging from bin.001260 to bin.001357. On my…
0
votes
2 answers

Haproxy with MySQL Cluster Setup

I have 2 MySQL servers with master-master replication between them. The replication is working fine. I need to configure high availability between them so that if either one of them goes down, the other takes up. I'm following this…
0
votes
1 answer

Master-Slave replication with additional selective replication

Using MySQL 5.6 Enterprise is it possible to have a normal master/slave replication between a master and slave with full replication then a second slave server to only have certain tables?
0
votes
1 answer

Mysql slave stoped and fail to initialize relay log

A couple of days ago I setup a slave MySQL server (Mysql Community Server 8.0.21). So far we only use it for backup using mysqldump. I did notice that he was using too much memory, but I did not mind because I used a few conf params that…
user587541