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

Aggregating data from multiple MySQL servers

I have 10 MySQL servers and each one holds a database that needs to be replicated to a single, centralised MySQL server. The complexity is that each server must replicate its database to the same database on the centralised server, essentially…
Richard Keller
  • 2,040
  • 2
  • 19
  • 31
0
votes
2 answers

MySQL Master Slave Replication Not Working

I setup MySQL master slave replication, but none of the databases, tables, and data is being copied over to the slave from the master. Here is the relevant configuration on the…
Justin
  • 5,328
  • 19
  • 64
  • 84
0
votes
1 answer

msyql replication time

I am planning to setup mysql master-master or master-slave configuration. Yet to be decided. But my question is, is there any way to specify in the slave or master saying that it needs to check for master's binary file every say, 5 seconds or so ?…
Sangfroid
  • 187
  • 4
0
votes
1 answer

mysql performance optimization after enabling replication

Over the weekend I upgrade my Ubuntu server from 9.10 to 10.04 which also updated my MySQL server. I also enabled MySQL replication over to another server as slave. I have not yet moved any application logic to use slave but I started seeing some…
Sparsh Gupta
  • 1,127
  • 7
  • 21
  • 31
0
votes
2 answers

Replicate mysql database to DBserverBackup without stopping the service on DBserver

I have an Ubuntu Server with mysql database on it and I would like to copy its full content (data, users, anything) to another mysql server I have on the network. How can I obtain this result (automatically, maybe using cron) taking care of security…
Pitto
  • 2,009
  • 10
  • 33
  • 49
0
votes
1 answer

MySQL table keeps corrupting, need a simple fail over solution?

One of my clients servers recently crashed at the planet, we got an automatic email from them that they had to do a hard reboot. Since then mysqld stops running occasionally and then shopping cart stopped letting users add products to their cart. I…
Anagio
  • 216
  • 2
  • 15
0
votes
1 answer

how mysql replication

I'm doing mysql replication (master - slave). There are a few questions Can I assign replication for some databases and not all databases that are on master (for example, ON master server there are db's: a, b, c, d I want to do replication on a, b,…
user86187
  • 33
  • 1
  • 5
0
votes
1 answer

MySql backup using mysqldump in replication environment

I was checking the mysql backup script that being designed by senior mysql admin (left long time ago), just in order to implement the same setup for different client. all the steps were clear and match the guides and instructions provided in mysql…
Jawad Al Shaikh
  • 254
  • 1
  • 3
  • 15
0
votes
1 answer

Best MySQL failover and load-balancing for shared hosting environment

I am creating a shared hosting environment, load balanced and HA. HTTP/HTTPS is okay as well as the distribution of files (code and file uploads) between the servers. The last thing remaining is to load balance and make HA MySQL. I have two servers…
rtacconi
  • 745
  • 4
  • 14
  • 28
0
votes
2 answers

Mysql replication where is ./data?

By following http://dev.mysql.com/doc/refman/5.1/en/replication-howto-rawdata.html I stuck when it ask me to shell> tar cf /tmp/db.tar ./data, where is ./data ?
wizztjh
  • 103
  • 4
0
votes
2 answers

Keeping two servers in sync - secondary server only to be booted for the backup, or in outage

I've just started a new Software Development job but I've basically been given loads of sysadmin stuff to do because the development team consists of only 2 people + the CTO. I've got pretty much zero experience with kind of stuff and focused mainly…
0
votes
1 answer

MySQL third-party replication agents or alternatives to circular replication

I'm planning the set-up of a secondary datacenter for an existing system that runs in a single facility and uses master-master MySQL replication between two machines. I plan to add two machines to the second facility to make four machines in total.…
smin
  • 771
  • 4
  • 5
0
votes
1 answer

Syncing with Master DB after slave record is modified

I've set up a MySQL replication scheme between 2 remote databases. I've realized that if I change data on the slave DB, the changed data does not get updated again. For example, I have a table User and I create a new user Joe on the Master DB. Joe…
samxli
  • 203
  • 1
  • 3
  • 11
0
votes
3 answers

What is a good tool/method for version controlling a part of a live database?

Sometimes if a database gets corrupted, a replicated database could also replicate that same corruption. What is the best way to replicate/backup a database and prevent something like this from happening? (specifically for MySQL)
0
votes
1 answer

MySQL Replication, Master vs Slave commits

I have a production webserver with a MySQL database setup as Master. I have a dev server with MySQL setup as Slave, with the data successfully being replicated from the Master. What happens when a developer commits a chance to the Slave db? Is…
Josh Brower
  • 1,669
  • 3
  • 18
  • 29