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

Easiest way to sync a dev MySQL db to a production MySQL db?

We have a staging server with MySQL installed locally. We plan on running Expression Engine, which requires a database. On the production side, we have two apache servers that are load balanced, so we'll need to install a mysql server on dedicated…
sdot257
  • 3,059
  • 5
  • 30
  • 39
0
votes
2 answers

Mysql Replication-- restricting drop database statements

we have a master-slave mysql replication setup. The master has multiple databases and they get created and dropped, fairly often. I would like to restrict the slave to not drop the databases. I couldn't find any such option on the mysql help page.…
0
votes
2 answers

Any problems with my mysql replication setup command?

I wrote myself a small script that produces the following shell command. echo "CHANGE MASTER TO MASTER_USER='slave_user';" | mysql -uroot -pXXX --host=SLAVE && echo "CHANGE MASTER TO MASTER_PASSWORD='slave_password';" | mysql -uroot -pXXX…
The Shurrican
  • 2,240
  • 7
  • 39
  • 60
0
votes
1 answer

MySQL Master-Master replication using MMM on Linode

Linode allows you have multiple IP's assigned to your node but I'm trying to setup MySQL Master-Master Replication with MMM following the guide on http://mysql-mmm.org/mmm2:guide. One part I don't understand is that MMM needs virtual IP's. So my…
MrD
  • 235
  • 5
  • 11
0
votes
1 answer

Can't login as replication user

mysql> GRANT REPLICATION SLAVE,FILE ON *.* -> TO 'repl'@'localhost' IDENTIFIED BY 'password123'; mysql -u repl -p'password123' Access denied for user 'repl'@'localhost' (using password: YES) Is a mysql user with replication privilege only,…
gAMBOOKa
  • 999
  • 6
  • 19
  • 34
0
votes
2 answers

change a mysql table column on slave then promote to master

If I want to change a NOT NULL column to allow for null values, is it safe for me to run that ALTER TABLE on my DB slave, wait for it to catch up, and then promote it to master?
Aaron Gibralter
  • 197
  • 1
  • 9
0
votes
1 answer

Promote MySQL master-slave to master-master replication

I'll be doing a upgrade of a large MySQL 5.0 database to Percona 5.1 and I'm attempting to keep the actual downtime as short as possible during the upgrade, so the regular mysqldump + mysql import procedure doesn't work as well for me as the…
0
votes
0 answers

MySQL is killing the server IO

I manage a fairly large/busy vBulletin forums (running on gigenet cloud), the database is ~ 10 GB (~9 milion posts, ~60 queries per second), lately MySQL have been grinding the disk like there's no tomorrow according to iotop and slowing the site. …
OneOfOne
  • 222
  • 4
  • 13
0
votes
1 answer

What is the best of two approaches to achieve DB Replication?

we have two approaches to achieve DB Replication: Master-Master replication. Master, 1 Primary Slave, 1 Secondary slave. I am planning to analyze these two approaches and prepare a comparison report with a recommendation.Currently, I have setup…
vijay.shad
  • 129
  • 2
  • 6
0
votes
1 answer

Heartbeat or bash or something else for trivial cluster management?

I think what I am trying to do can be achieved using bash scripts, but I could definitely use some help here ! Ok, here's the scenario: I have a two-node MySQL cluster with Master-Master replication in place. Now, the application in question (SOGo)…
Mohit Chawla
  • 486
  • 1
  • 4
  • 11
0
votes
2 answers

How do I correct replicaiton on the primary master after reconfiguring replication in a MySQL-MMM cluster?

I have a MySQL-MMM cluster with three database servers (two masters and one slave). Recently replication was broken by someone directly inserting to the slave database servers. After I discovered this I reestablished replication from the db1 system…
Dave Forgac
  • 3,546
  • 7
  • 37
  • 48
0
votes
1 answer

mysql smart replication

Is it possible to setup some kind of smart replication, so that these columns are automatically updated if they are changed in another database .. Like : rows are automatiically added, some columns are automatically synced, but other columns are not
user47556
  • 509
  • 1
  • 5
  • 11
0
votes
1 answer

mysql replication - disabling any other DB changes on slave

I have configured mysql to replicate itself to another DB server. Through my testing of this setup, it appears that the slave can have values changed manually in the replicated databases. Is there a way to disable any changes on the slave…
0
votes
2 answers

Remote Monitoring for Status of MySQL-MMM Monitoring Host

I have a simple MySQL-MMM setup with a dedicated monitoring host as described in their installation guide. I also have a separate monitoring system that is able to check status URLs so I'd like to set up some simple monitors to check for the status…
Dave Forgac
  • 3,546
  • 7
  • 37
  • 48
0
votes
1 answer

Downtime While Performing Maintenance on the MySQL-MMM Monitoring Host?

We have a MySQL-MMM environment with two masters, two slaves, and a monitoring host. We need to perform maintenance on the monitoring host (quick hardware replacement). I know that while the monitoring daemon isn't running, the floating IPs won't…
Dave Forgac
  • 3,546
  • 7
  • 37
  • 48