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

How to check if MySQL replication is using SSL

I have a MySQL (actually mariaDB) install that I just started replicating to another server. I want to ensure that I've setup SSL correctly. The SSL portion of SHOW SLAVE STATUS looks like: Master_SSL_Allowed: Yes Master_SSL_CA_File:…
nwalke
  • 643
  • 2
  • 12
  • 32
2
votes
2 answers

How do I handle mysql replication in EC2 using private IPs?

I am trying to set up a mysql master/slave configuration in two EC2 instances. However, every time I reboot an instance, the IP address (and hostname) changes. I could assign an Elastic IP address, but would prefer to use the internal IP address. I…
chris
  • 3,993
  • 6
  • 28
  • 37
2
votes
3 answers

MySQL Replication A->B->C

I was setting the MySQL Replication for master -> slave/master -> slave and Replication for master -> slave its works fine but when i have enable this option in my.cnf log-slave-updates=1 for updating the master bin log my replications is starting…
nonus25
  • 261
  • 1
  • 4
  • 9
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
2 answers

Setting up MySQL database replication [without restarting mysql]

I'm trying to setup MySQL db replication, it seems pretty straight forward. I was using this tutorial: http://www.howtoforge.com/mysql_database_replication Now I run a rather large MySQL database for a very large website, and in this tutorial it…
Mr.Boon
  • 1,471
  • 4
  • 24
  • 43
2
votes
3 answers

MySQL specific database replication (Master - Master)

We have a MySQL server at one location, replicating to another in a Master->Slave configuration. There are about 5-7 different databases on this server. We are wanting to do this... We have a second site that we are wanting to move all our web…
C. Baker
  • 21
  • 1
2
votes
3 answers

Rebuild mysql slave from scratch

I'm having a master/slave mysql setup. This night I had some problems with the master. I needed to recreate all databases again because they were corrupt. Now I stopped my mysql slave but want to start it again and rebuild everything from scratch.…
Ward Loockx
  • 205
  • 1
  • 3
  • 11
2
votes
1 answer

MySQL 5.5 replication setup on ubuntu 12.04

The following master-master configuration worked on MySQL Server 5.1.x(Ubuntu 10.04). Master1(192.168.2.80) ################################## #MySQL Replication ################################## skip-host-cache skip-name-resolve event_scheduler =…
user53864
  • 1,723
  • 11
  • 37
  • 66
2
votes
2 answers

MySQL binary logging

My server is telling my that binary logging is disabled. When I do a mysqladmin variables, I see this: log_bin | OFF. This is my configuration file: [mysqld] # These are some standard (Plesk) options…
2
votes
2 answers

How to reset mysql's replication settings completely, without reinstalling it?

I set up mysql replication by adding references to binlogs, relay logs etc in my.cnf restarted mysql, it worked. I wanted to change it so I deleted all binlog related files including log-bin.index, removed binlog statements from my.cnf restarted…
fastmultiplication
  • 231
  • 1
  • 2
  • 9
2
votes
2 answers

What do you think about this Debian Backup strategy?

I am not really a sys admin, I am mainly a developer with some unix knowledge, and because we don;t have any competent sysadmin , I have been delegated the task to implement the backup strategy. We have many web servers, some are running Mysql…
Ant
  • 193
  • 1
  • 9
2
votes
1 answer

Automatic promotion of slave in MySQL master-slave replication

In a master-slave replication environment, what is required to automatically promote the slave as the master if the master goes down. What are common practice used to change the database reference from an application if the heartbeat of the master…
Dennis Y.
  • 61
  • 4
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…
liquorvicar
  • 161
  • 1
  • 4
2
votes
3 answers

How do I quickly create new instances of complex MySQL database?

I'm managing an enterprise web application that uses Amazon's RDS as our database server. Our architecture is such that when a user signs up for a new account we create a brand new database for them in RDS. The database has around 63 tables, most of…
Mel Green
  • 121
  • 4
2
votes
1 answer

Replication stops

I have 2 CentOS 5.5 servers runnig Mysql 5.5, configured as master-master replication. When on one server i have network problems, on another i see messages in log: 111105 2:38:30 [Note] Stop asynchronous binlog_dump to slave (server_id: 2) when…
Slezhuk
  • 375
  • 1
  • 2
  • 6