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

MySQLD is using 175% of the cpu

On one of the servers, I have mysqld running as slave DB. The CPU usage is 175% at the moment used by mysqld. Here are the results of SHOW…
0
votes
1 answer

MySQL Master-Master Replication Issue

I have two databases that sync data through Master-Master replication. The setup was created using the following guide: digitalocean.com/community/tutorials/how-to-set-up-mysql-master-master-replication Until 2 days ago the system had been running…
0
votes
1 answer

Mysql database restore

My mysql backup is running everyday at 4 am & accidently my database got corrupted at 7am. Now how to restore data updated between time period of 4am & 7am
Huzefa
  • 65
  • 4
  • 13
0
votes
2 answers

how to sync mysql tables using maatkit tools

I know my slave is at least a little out of sync from the master... and reading I found that many places say that mk-table-checksum + mk-table-sync from maatkit are the tool I should use to fix this. The issue is that I can't find any good example…
Gabriel Sosa
  • 1,220
  • 1
  • 13
  • 13
0
votes
0 answers

MySQL replication, slave don't connect

I try in mi LAN with 2 VM a master-to-master replication, configure: #bind-address = 127.0.0.1 server-id = 2 auto_increment_increment = 2 auto_increment_offset = 2 log_bin = /var/log/mysql/mysql-bin.log binlog_do_db = blog And: #bind-address =…
user177949
0
votes
1 answer

update and insert MySQL DB on AWS RDS with local MySQL DB

I have created an RDS database and have used mysqldump to send all my local data to that remote database using the following commands: $ mysqldump -u root fishDB > localDB.sql $ mysql -h fishinstance.xxxxxxxxx.us-east-1.rds.amazonaws.com -u mola -p…
0
votes
1 answer

MySQL Replication across two mounts on AWS Amazon Linux

Recently we took advantage of the SSD instance stores available on AWS. While these are great, they obviously get deleted when the instance dies. Obviously the performance of non Provision IOPS is not great, and would be better on the SSDs. If we…
0
votes
1 answer

MySQL Cluster with no access to Data Nodes

I'd like to set up a MySQL Cluster for HA, but the client of the data cannot yet use ClusterJ. I would like create 2 SQL Nodes and access only them from the client. i.e. No access to the NDB Data nodes. Is this a valid configuration? Can I connect…
paiego
  • 253
  • 2
  • 8
0
votes
1 answer

What is wrong with this iptable for Mysql Replication

I'm not quite used to IPTables and I'm trying to run an iptables script to allow only ssh connection from all and connection to mysql server only from specified IPs. I made a bash script for this, which is lister under, but when I run this, my…
Cyril N.
  • 624
  • 1
  • 10
  • 36
0
votes
1 answer

MySQL keeps starting logger and constantly restarts?

Alright, I have updated version 5.1 to version 5.6 without uninstalling the old one by using update-alternatives. This works just fine on our production/master server, but our replication slave seems to be having trouble. First, in the processlist…
Cobra_Fast
  • 650
  • 2
  • 8
  • 23
0
votes
2 answers

Slave SQL Thread not running

My replication suddenly went offline. SHOW SLAVE STATUS shows me that I/O Thread is running, while SQL thread is not. I have error message: Fatal error: Found table map event mapping table id 0 which was already mapped but with different…
Vlad Chaotic
  • 1
  • 1
  • 1
  • 1
0
votes
1 answer

MySQL Replication Stale

I had some interesting problems with Maria DB. 1st I have max_connections in config under section [mysqld] but the value is always 214 (default) after restart. So the problem is I can't defined the value in config (server version …
nonus25
  • 261
  • 1
  • 4
  • 9
0
votes
1 answer

MySQL - Why would SHOW SLAVE HOSTS cause a binlog dump?

We're getting loads of binlog files in our MySQL 5.0.x. We have a normal master/slave replication thing going with 1 master, 1 slave. Looking at /var/log/mysql.log, nearly 90% of the time the replicator connects and does a SHOW SLAVE HOSTS causes a…
Amandasaurus
  • 31,471
  • 65
  • 192
  • 253
0
votes
3 answers

MySQl, Postgresql replication comparison

One main issue with MySQL replication is that the slave is single threaded. This can cause replication lag. How does Postgresql handle replication? Does it (or add-on such as slony-I) allow multi-threaded slaves? In general, what are the pros and…
0
votes
1 answer

MySQL Slave not processing relay logs fast enough

I have a Master-Master cluster with 2 Percona 5.5.30 servers. (Lets name them 1 & 2) The OS is FreeBSD 9.1 I have an issue that server 2 is not processing the relay log fast enough. I know that for sure, because when i create a new table on server…
shaharmor
  • 337
  • 4
  • 16