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
-1
votes
1 answer

MySQL table only replication (Master->Slave)

I've set up two servers (one master and one slave db). I want to synchronize one single table of a whole database live (or with a delay of up to 5 minutes) in only one direction. I wanted to try the DB replication in total first, but after setup…
kentor
  • 153
  • 1
  • 5
  • 10
-1
votes
1 answer

MySQL - data inside vm on shared storage?

I'm planning on moving all my VMs to shared storage, and I have a question about how to deal with a MySQL VM: Currently the size of the VM image is 100GB, where most of the space is taken up by the MySQL data. I feel there are two options when…
James
  • 325
  • 2
  • 11
  • 22
-1
votes
1 answer

Mysql MariaDB replication broken

I have a primary DB and two replicates. replicate1 became corrupted when the linux server was rebooted without stopping mysqld. I want to load replicate1 with a dump I've taken from replicate2 with the command mysqldump --master-data…
-1
votes
1 answer

MySQL won't start if I set the log_bin

[mysqld] datadir=/db_vol/datadir socket=/var/lib/mysql/mysql.sock port=3306 server_id=1 log-bin=/db_vol/log/mysql-bin.log binlog-do-db=mydb When I try to start MySQL, I get an error that says MySQL Daemon failed to start.. If I comment out the…
Shamoon
  • 911
  • 4
  • 14
  • 22
-2
votes
2 answers

how to use mylvmbackup

any useful tips or easiest way
hkshambesh
  • 63
  • 3
  • 7
-2
votes
1 answer

log error in mysql replication

I use mysql replication. At slave, i read in aa.err Statement may not be safe to log in statement format. Statement: update idv_product set visit = visit+1 where id = '173' limit 1 I don`t understad, guide me about error above.
-3
votes
2 answers

What's the best method to achieve full redundancy in a dedicated server?

I've been reading about full redundancy to achieve almost if not 100% uptime for your mission critical applications (handling financial data) running in a dedicated server, but I still can't wrap my head on how I could do this. 1) Let's say I have…
officeboi101
  • 121
  • 1
  • 3
  • 5
-3
votes
1 answer

MySQL Replicator requirements

I have a simple MySQL Master-Slave replication setup, but always get an unaccaptable huge slave lag. That means that the slave lag will get higher than the expire_logs_days of 14 and the replication will crash. So, here are some facts: MySQL…
sme
  • 1
  • 2
-6
votes
1 answer

How to test HA MySQL Database

Recently we have been testing an HA Database solution from a 3rd party provider. I have done some stress tests to see some metrics for Master & Slave status etc, however I would like to test the actual failover. I need a way to test the failover or…
1 2 3
34
35