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.

527 questions
3
votes
1 answer

error 1236 A slave with the same server_uuid/server_id as this slave has connected to the master

I got this error when configuring single master multiple slave servers. Last_IO_Error :Got fatal error 1236 from master when reading data from binary log : ' A slave with the same server_uuid/server_id as this slave has connected to the master; the…
3
votes
1 answer

AWS RDS MySQL Replication with user with REQUIRE SSL

I'm trying to set up a MySQL read replica on AWS RDS. The user for the slave (rdsrepladmin) has the REQUIRE SSL flag set. This causes the read replica server to enter a perpetual 'read replication: connecting' state. So, I'm read that I need to (on…
Jacco
  • 377
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,798
2
votes
1 answer

Hard reboot causes MySQL replication to break

I have encountered an issue with my replication setup. Under normal circumstances it performs as intended, but it breaks if it encounters a hard reboot (I pull the power cable). Setup The setup consists of two servers, server-1 and server-2. The…
2
votes
1 answer

MySQL replication and UPDATE prioritisation

I have a master server, where I want modify operations such as UPDATEs to be LOW_PRIORITY so that they don't block SELECTs etc. This is better for end-user visible behaviour. I have a slave server, where I do batch processing, and I don't care about…
2
votes
1 answer

Finding binary log position to start replication

I'm setting up master/slave replication on a non-trivally-sized schema (around 3Gb of data) and I'm trying to work out the best way to go about it. I have a backup script working on the master that uses mysqlhotcopy to take a cope of the schema in…
2
votes
2 answers

Why MySQL replication process is idle for so long time?

Time: 5280463 Status: Has sent all binlog to slave; waiting for binlog to be updated Is it okay that mysql replication process is idle for so long time?
Rihards
  • 779
2
votes
2 answers

Mysql replication server both master slave

I have a mysql db in my box. Can I replicate it to another db on the same box? ie, the same box would be both master and slave(s). Are there other ways of achieving this? (I'm thinking pointers/references, because it's in the same db system)
Jonny
  • 153
1
vote
0 answers

Mysql replication, master_log_pos sync but tables not update

First, my replication config on Master: server-id = 1 replicate-same-server-id = 0 auto-increment-increment = 1 auto-increment-offset = 1 log-bin = /var/log/mysql/mysql-bin.log expire_logs_days = 5 binlog_format =…
1
vote
3 answers

Seconds_behind_master value keeps on increasing in MySQL replication slave

We have a MySQL 5.0.77 Master-Slave replication. The replication was not properly running for the past few weeks and it was giving Duplicate entry error 1062. The Set Global Skip-counter option didn't help, so I had to skip the error no.1062 by…
Manny0606
  • 141
1
vote
1 answer

Mysql Multi slave replication

Hi I have a master Mysql server from where i am replicating other 2 slaves. The issue is one of the slave stops with an error frequently. The error message is below. Error 'Duplicate entry '1993996' for key 1' on query. Default database:…
1
vote
1 answer

MySQL replication recovery

I can't sync the slave server after master server crashed. Could you please advise if the recovery is possible (without data/transaction lost) or do I have to create a new slave server? Please note that I stooped slave after this error: mysql> SHOW…
HTF
  • 3,198
1
vote
1 answer

MAMP MySql Master Slave Replication on local machine

Has anyone got a good tutorial or info how to make a master slave replication on a local machine with MAMP 2.0? Should I install multiple MySQL instances or can I do it with one installation? Thanks
user416096
  • 11
  • 1
1
vote
1 answer

What version of MySQL first supported row-based replication?

I'm thinking of switching from STATEMENT-based to ROW-based MySQL replication, but I'm having a hard time figuring out if ROW-based replication is available on my 5.1.41-3ubuntu12.10-log server/client. Looking at the documentation…
1
vote
2 answers

MySQL Slave set-up with lots of databases

I find myself in need of setting up a master-slave replication between a MySQL server with 4000+ DBs and it's first slave. The database is currently handling production workload and starting up replication must be done without incurring downtime.…
1
2