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
3
votes
1 answer

MySQL on VMware for High Availability

Given a choice between the current database-level HA options for MySQL, like Master-Master, Cluster, or Galera, and vSphere HA for the machine running the MySQL master, which would you use or combine and why?
3
votes
1 answer

my.cnf file makeup, does the [] headers matter?

I've got a pretty basic question, I am making a configuration script for mySQL replication between 2 new blank servers, now to make it a bit more failsafe I added the lines: sed '/log-bin/d' /etc/my.cnf sed '/server/d' /etc/my.cnf So that, if there…
Entity_Razer
  • 475
  • 1
  • 5
  • 17
3
votes
2 answers

MySQL binlog format dilemma?

MySQL version: 5.5.13 If I set binlog format to STATEMENT, I got the following warnings on the Master: [Warning] Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it …
quanta
  • 51,413
  • 19
  • 159
  • 217
3
votes
1 answer

MySQL Multi-Master Replication vs. MySQL Cluster

I need a MySQL database that is fast and supports many connections. Most of the connections will only be reading, but a few will be reading/writing. All connections will need to read and write at least some data. I have 4 test servers to dedicate…
Brad
  • 1,419
  • 22
  • 43
3
votes
2 answers

mk-table-sync in a master-slave scenario: Changes not replicated to the slave

I have being employing mk-table-sync to synchronise tables from a master to slave on mysql 5.1. Unfortunately, while differences are correctly detected, modifications done on the master (DELETE,REPLACE,ecc.) do not seem to be propagated to the…
Fulvio Scapin
  • 115
  • 1
  • 6
3
votes
3 answers

Secure MySQL replication; SSL or SSH tunneling?

I have a Master-Master MySQL replication setup between two servers. I'm about to move one to another location, so replication will be over the Internet and will - of course - need to be secured. From what I can tell, I basically have two…
Andrew Ensley
  • 932
  • 2
  • 17
  • 30
3
votes
3 answers

MySQL-Cluster or Multi-Master for production? Performance issues?

We are expanding our network of webservers on EC2 to a number of different regions and currently use master/slave replication. We've found that over the past couple of months our slave has stopped replicating a number of times which required us to…
Phillip B Oldham
  • 1,026
  • 5
  • 15
  • 24
3
votes
5 answers

Using MySQL replication to enable a read-only copy of a database in a DMZ

I need to set up a MySQL database instance in a DMZ that is a read-only copy of the live master inside a secure network. MySQL replication seems ideal for this, except that it works by the slave "pulling" changes from the master. This implies that…
mrowe
  • 133
  • 1
  • 4
3
votes
1 answer

Mysql replication, Slow resyncing of slave after an error

I have a slave that got an error about a months or so ago and got way behind the master. I fixed the error and now playing catchup with the master but its going very slowly. Its going at 1.3x real time. I was using less that 10% of the db resources…
James Hackett
  • 205
  • 1
  • 8
3
votes
1 answer

One way replication from MSSQL2005 to MYSQL 5.x

I have a mysql database acting as our websever backend. We have our production mssql server that we would like data pushed from, to our mysql server. I have successfully made the mysql server an ODBC system datasource. I can do an insert update…
3
votes
1 answer

Replication of multiple masters to a single slave server

I am running MySQL 5.1.36 in all my servers. I want to replicate database_A from master_host_A and database_B from master_host_B into a single slave server. All the three MySQL servers are remotely located. Is it possible for me to setup…
Supratik
  • 2,154
  • 10
  • 51
  • 66
3
votes
1 answer

Failover strategy for a 4 servers scenario

I am trying to figure out how to set up replication & failover in a scenario with 4 servers (2 per location) where any server may assume the Master role. My initial scenario is the following one: 2 servers in location A (One Master, One Slave); 2…
3
votes
3 answers

MySQL replicate structure only

Can I set up MySQL as a slave only replicating structure changes? (CREATE / ALTER TABLE etc.). I've got 2 reasons for this: Multiple developers with development branches in code which should always work with a 'fresh' datastructure, fetched from a…
Wrikken
  • 981
  • 9
  • 22
3
votes
1 answer

Run multiple instances of MySQL on the same server ( with replication)?

we have a current dedicated box with 8 GBs of RAM ( dual quad core CPU) and our DB has grown over 17 GBs ( over 3 DBs for our application ). Im assuming this is reason enough to move to a machine that has more memory ( putting sharding aside ). The…
Prem
  • 31
  • 2
3
votes
2 answers

Replicate Oracle to MySQL

I am developing a web apps, this web application will be using MySQL. Now I need to replicate my client's Oracle database into MySQL, only a few tables will be involved.. a table can be up to 2-3 million rows. I only have SELECT privilege on this…
Rosdi
  • 239
  • 2
  • 3
  • 11