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

Master master replication in mysql

i am new in mysql and trying to establish master master replication in mysql on first server i have added these lines to mysqld section of my.cnf(mysql Ver 14.12 Distrib 5.0.77, for redhat-linux-gnu (i686) using readline…
user57898
0
votes
3 answers

Two way, multi-site replication in MySQL

We have MySQL 5.1 databases at 5 separate locations that we need to keep as synced as possible. Each office needs to read/write from/to the local server at that office, but I need the DB at each office to reflect changes made at all offices. …
nedm
  • 5,630
  • 5
  • 32
  • 52
0
votes
2 answers

dedicated database server location

I have serveral WordPress sites running on the same dedicated server. On each site, I use a auto content plug-in which posts content once or twice an hour. This is slowing down the sites because of load on mysql. I want to buy another dedicated…
user57649
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?
Dexter
  • 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
  • 183
  • 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
  • 2
  • 9
  • 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…
OM The Eternity
  • 111
  • 1
  • 8
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,472
  • 23
  • 88
  • 143
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

Kubernetes InnoDBCluster: all pods should share one PersistentVolumeClaim?

Kubernetes InnoDBCluster: all pods should share one PersistentVolumeClaim? Following: https://dev.mysql.com/doc/mysql-operator/en/mysql-operator-innodbcluster-simple-kubectl.html kubectl create namespace mysql-cluster-test kubectl create secret…
0
votes
1 answer

why mysql bin logs are not expiring even though expiry was set

I am using 5.7.37-log MySQL Community Server. my mysqld.cnf looks below: server_id = 11 log_bin = bin.log log-bin-index = bin-log.index binlog_format = row max_binlog_size = 100M socket = mysql.sock expire_logs_days = 1 when i check my logs they…
santhosh
  • 103
  • 4
0
votes
1 answer

Using AWS Blue/Green deployment, how do I modify the staging database?

AWS has rolled out a Blue/Green Deployment feature for RDS, allow you to create a staging (green) database that's in parallel with your production (blue) database. Their documentation specifically says you can make changes and test them out,…