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

Lots of tiny mysql-bin.NNNN files

We're using mysql 5.0.somethin with a binary log and replication. However /var/log/mysql is full of lots of tiny 141 byte sized mysql-bin.NNNNN files. using mysqlbinlog I can see that they are empty of meaningful SQL statements. It's not really too…
Amandasaurus
  • 31,471
  • 65
  • 192
  • 253
0
votes
1 answer

Is there a log to see when a user is trying to access file/directory that he doesn't have permission?

My database is failing to replicate and the only clue in the error log is Operation Not Permitted, which I am guessing is file access permission failure either on donar or joiner. Is there any file that I could tail to see what exactly files does…
Gajus
  • 851
  • 5
  • 16
  • 28
0
votes
1 answer

Single slave - multiple master MySQL replication

I need to replicate different MySQL databases from multiple servers into a single slave server. How can this be done? is there a way to define multiple master hosts?
0
votes
3 answers

MariaDB Galera Cluster

I ma trying setup MariaDB in cluster but looks like I stuck on this error: #mysqld -u mysql 130407 21:36:24 InnoDB: The InnoDB memory heap is disabled 130407 21:36:24 InnoDB: Mutexes and rw_locks use GCC atomic builtins 130407 21:36:24 InnoDB:…
nonus25
  • 261
  • 1
  • 4
  • 9
0
votes
1 answer

MySQL Slave Not Replicating

I had a deleted some data on the master mysql. Looking at the slave status, it shows this: mysql> show slave status \G; *************************** 1. row *************************** Slave_IO_State: Waiting for master to send event …
PLui
  • 121
  • 4
0
votes
1 answer

Make heartbeat check MySQL replication lag before resource takeover

I am using heartbeat with MySQL master-master configuration, and using mon to check up on MySQL health. All works well for detecting downed host or broken MySQL. But the problems start after takeover, when replication collisions start piling up. Is…
Sergey
  • 948
  • 5
  • 10
  • 22
0
votes
1 answer

Replicate from slaves to master and viceversa

I've a great dilema here and didn't know how to solve it. I need to replicate a few tables from MySQL DB (slaves) to MySQL DB (master). Take as an example this: MySQL DB (master) table1 table2 table3 MySQL DB (slave1) table1 table2 …
0
votes
2 answers

How to proceed setting up a secondary mysql linux slave?

I have a mysql database master and slave in production. I want to setup additional mysql slave. There is around 15 Terabyte of data in the database and there are MYISAM and InnoDB tables in the database. I am thinking of below options: Shutdown…
Boolean
  • 533
  • 1
  • 4
  • 10
0
votes
2 answers

Synchronisation between MySQL databases on different hosts

I want to solve a data replication/data sync problem between two MySQL server instances. Both of them have the same database structure (databases, tables, columns, everyting ...) but each of them has a different priority when it comes to storing…
therufa
  • 257
  • 1
  • 5
  • 18
0
votes
1 answer

MySQL replication lag increasing

I have simple master-slave replication setup. Everything worked with no problems for more than a year. Few days ago replication lag started to rise and it's still rising with no obvious reason. Seconds_Behind_Master is now more than 4 days and 6…
Matthias
  • 187
  • 3
  • 10
0
votes
4 answers

How to use read replica instance for websites? Amazon RDS MySQL

Amazon RDS FAQs stated that it is up my application to distribute traffic to the read replica. My websites have mostly visitors - non-logged in users. So, I suppose most database activities are read. I am supposed to set the MySQL database…
ericn
  • 553
  • 2
  • 8
  • 20
0
votes
1 answer

MySQL replication ignore data changes but not table structure changes

Is there a way to setup MySQL replication so that CREATE TABLE and ALTER TABLE statements get replicated but INSERT, DELETE and UPDATE statements do not? I've got replication working fine and have several tables that are ignored as per the…
Ed Manet
  • 532
  • 1
  • 5
  • 17
0
votes
1 answer

Percona XtraDB Cluster - Node Won't Join

I am trying to add a node to a new cluster but am met with the following log entries: 120915 16:47:32 [Warning] WSREP: error executing 'SET GLOBAL innodb_disallow_writes=1': 1193 (Unknown system variable 'innodb_disallow_writes'). Was mysqld built…
0
votes
1 answer

How to take mysql replication backup

I have a MySQL master-master replication setup with a slave for each master(only one master used for read/writes at a time) on Ubuntu server. Wondering what would be the best way to schedule backup of replication databases with mysqldump. I have…
user53864
  • 1,723
  • 11
  • 37
  • 66
0
votes
3 answers

MySQL replicate multiple places

Very trick task to find a good title for this question, but here goes the q: I have a few development machines, where I develop my PHP applications on, and testing via a local webserver. This works out pretty well for each machine. However, I would…
Frederik
  • 3,359
  • 3
  • 32
  • 46