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

In MySql how to replicate specific tables with two different databases?

We have a situation in which we need to have two separate databases, DB1 has X number of tables and DB2 has 4 tables in which 3 of them must be synced with DB1, so that no matter we update these 3 tables from DB1 or DB2 it synced with each other.…
Rizwan Yahya
  • 111
  • 4
0
votes
1 answer

managing web traffic by replicating that website into cloud

Possible Duplicate: How do you do Load Testing and Capacity Planning for Web Sites Can we manage traffic on a website by replicating that into a cloud after the highest possible load on that site? Like a website can allow 7000 user to surf on…
yugal
  • 1
0
votes
1 answer

install MySQL Server 5.0 on CentOS 6.3

How can I install MySQL version 5.0.x to CentOS 6.3. The MySQL in CentOS 6.3 is version 5.1. The MySQL 5.0.x is required to run a slave database of a master database server running MySQL 5.0.x
myhusky
  • 5
  • 2
  • 3
0
votes
1 answer

mysqlbinlog does not continue to last log

I am using the following command to start reading mysqlbinlog. mysqlbinlog -t -v -v --base64-output=DECODE-ROWS -h my_host -ppasswd -R mysql-bin.000960 -j 1052323996 I would expect the output to continue to the next log file, since I am using -t,…
simao
  • 151
  • 5
0
votes
1 answer

Mysql varchar issue on replication

This issue is showing it a duplicate key, but when I verify I could understand that one column having varchar(5) and the insert is having more than 5 character, normally it will get truncated and will get inset. But here it is giving error. Error…
arn
  • 91
  • 2
  • 7
0
votes
1 answer

MySQL slave server from dumps

I've created a slave server from live machine which is acting as a master now. I use the following procedure to create it: mysqldump --opt -Q -B --master-data=2 --all-databases > dump.sql then I imported this dump on the new machine, applied the…
HTF
  • 3,148
  • 14
  • 52
  • 82
0
votes
1 answer

MySQL SSL replication

I'm currently testing MySQL replication over SSL. I have two mysql-slave pairs. I would like to configure second slave server for each pair in different data centre: Do I have to generate certificates for each master and slave server or can I use…
HTF
  • 3,148
  • 14
  • 52
  • 82
0
votes
1 answer

RDS slave (read replica) not replication

It appears overnight our Master RDS mysql server went offline for 3-4 minutes. When it came back online the replication was broken. On the slave, issuing SHOW SLAVE STATUS\G; "Got fatal error 1236 from master when reading data from binary log:…
jaredsten
  • 203
  • 1
  • 7
0
votes
1 answer

mysql relay log corrupted, How to recover?

I am running with one master and two slaves in a chain. ie Master-->Primary Slave-->Secondary Slave. The relay log of primary slave got corrupted. How can I recreate the relay log of primary slave without making any changes to the Primary Slave…
arn
  • 3
  • 1
0
votes
2 answers

Mysql Replicated database UPDATE not working

I have been trying to start replication in a MySQL database. I followed all the steps from the MySQL manual to setup and configure the replication. http://dev.mysql.com/doc/refman/5.1/en/replication-howto.html I could start the replication without…
user1226136
  • 111
  • 5
0
votes
1 answer

Client to use the slave when the master is down in MySQL replication

Is it possible for the client to use the slave when the master is down in mysql replication? I have already set up a simple MySQL replication having a master and a slave. The client connects to the master to access the database; any changes made to…
0
votes
1 answer

Setup MySQL replication - multiple machines?

i read a lot of mysql server repliaction tutorials, but there's no hint, if the slave server is on a second machine or on the same server but just another mysqld process? any advice? thanks in advance!
trnc
  • 688
  • 1
  • 12
  • 31
0
votes
1 answer

MySQL is failing to connect

I am building two mysql machines in master-slave config. Master has: mysql> create user 'repl'@'%.%.%.abc.mydomain.com' identified by 'mypassword'; mysql> grant replication slave on *.* to 'repl'@'%.%.%.abc.mydomian.com'; So basically anything like…
Aditya Patawari
  • 1,065
  • 10
  • 23
0
votes
1 answer

Is there a difference between the mysql native master/slave replication setup versus one that uses percona xtrabackup?

The reason I ask is because these instructions seem to indicate that setting up a slave is different when using xtrabackup.
Bon Ami
  • 225
  • 1
  • 2
  • 7
0
votes
1 answer

MySQL two master databases for two seperate apps

We have two different websites one is hosted in asia datacenter called it asiadata.com and other site is hosted in europe datacenter called it europedata.com. Currently we have only one master database server which is hosted in europe datacenter and…
user608676
  • 51
  • 3