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
3 answers

Rebuilding corrupt slave by copying mysql folder

Rebuilding an existing slave from a master using cold-copying of /var/lib/mysql, would this be the proper process/order? Anything missing? master mysql> SHOW MASTER STATUS\G (take notes) slave mysql> STOP SLAVE; Shut down master and slave…
Chris Weiss
  • 25
  • 1
  • 6
0
votes
3 answers

Master and Slave MySQL databases with different schemas?

I have some MySQL replication going on, and want to change the schema of the slave by adding a column. Will this work?
Greelmo
  • 117
  • 1
  • 6
0
votes
2 answers

What is a proper MySql replication configuration for frequent db updates and rare selects?

We currently have 1 master db on its own server and slave db on app server. App executes very frequent but light updates (like increasing counters), and occasional (once in a few minutes) heavy selects (which is the most important part of the app).…
serg
  • 245
  • 1
  • 3
  • 7
0
votes
3 answers

synchronize 2 mysql servers (all databases + users)

We want to sync 2 mysql servers with eachother (products & qa system). We would like to sync all databases, data and users of the production machine to a secondary mysql machine. What would be the easiest and best way to do this…
solsol
  • 1,121
  • 8
  • 21
  • 31
0
votes
1 answer

Is it possible to use the MMM tool without virtual IP capability?

We are on a host (Serverbeach) that does not support Virtual/floating IPs until you reserve at least a half-rack, which is just a little more than we are willing to spend per month right now. We do have 2 machines in one of their datacenters, and I…
Artem
  • 173
  • 1
  • 1
  • 6
0
votes
2 answers

Database cluster... without Master/Slave?

I'm wondering if it is possible to have a set of SQLdb servers to which data is written and have them replicate, avoiding conflicting information. I imagine that a Master/Slave structure would be mandatory, I would like to know if a system where…
RadiantHex
  • 547
  • 1
  • 8
  • 18
0
votes
1 answer

Suggest me solution to track the change in test DB and replicate in Another DB

Suggest me solution to track the change in test DB and replicate in Another DB... My Client need a script or any solution, if he has two Database, One Test DB in which he tests his data on test portal and if he find it appropriate he can use those…
0
votes
2 answers

How do I turn on mysql error logging without restarting?

I have a running mysql system that doesn't have any logging turned on. How do I enable the logging without restarting the server? I need to find out why mysql replication is failing. BTW. I tried /etc/init.d/mysqld reload But reload wasn't a valid…
hookenz
  • 14,132
  • 22
  • 86
  • 142
0
votes
2 answers

Initialize a MySQL slave server located on another network than the master

it's my first question here and English is not my native language but I'll try to explain. I've a master MySQL server with a public IP address running in my provider infrastructure and I want to run a local MySQL slave server in my office that will…
Remiz
  • 135
  • 6
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
  • 4
0
votes
0 answers

Upgrading MySQL from 5.1 to 8.0 replication

I have been tasked with replacing a MySQL 5.1 server with MySQL 8.0. So I built a CentOS 7 machine with MySQL 5.7 and now I am replicating from 5.1 => 5.7 Then I built a RHEL 9 machine with MySQL 8.0 and now I am replicating from 5.7 => 8.0 This…
ZCT
  • 13
  • 2
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 privileges broken by log_bin_trust_function_creators=1 flag

My privileges seem to be broken all round since enabling log_bin_trust_function_creators on GCP Cloud SQL I needed a trigger, which they don't allow at all with Binary Logging (which is enabled). So I enabled that flag, because the insert trigger is…
RR44
  • 1
0
votes
0 answers

MariaDB Replication Master Slave Login Slave Login Forbidden

Good day everybody, As a newbie, I apologize if I'm doing this wrong. About the situation: We have two physical Ubuntu servers. These are in the same network and act as master/slave servers. The replication of the databases and thus the approx. 300…