Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Is it possible to set up a MySQL master-slave replication for a single database to a slave server with multiple (shared) databases

Posted on 2015-01-29
1
386 Views
Last Modified: 2015-01-29
Hi,

I have a setup with currently two dedicated servers for the MySQL database.
One is the production server with the MySQL database which is accessed for read/ write transactions.
There is a second server that acts as a hot-standby and is in slave replication from this production server.

I would now like to add another slave server on a third dedicated server, but that MySQL server already has databases installed. The replicated database will be used for read-only analytics purpose and I want it separate so heavy analytics queries don't affect the production environment.

My question is, can I set up slave replication from the master MySQL server to this third MySQL server for just one database?

Thanks
0
Comment
Question by:SWB-Consulting
1 Comment
 
LVL 77

Accepted Solution

by:
arnold earned 500 total points
ID: 40578355
yes,
The connection is initiated from the one configured as a slave to the master.
The chain can be master-slave-slave
master slave (the slave instance will be the master for the second slave)


Have you considered having a master-master setup this way the switch/functionality could be preserved/loadbalanced


Make sure server IDs are unique.

backup/restore current state of the DB onto the new slave

replicate-do-db=<dbname> to select which DB this slave will be replicating.

if you do a master-slave/master - slave setup, on the middle server you would need to record the updates it receives so they are binlogged
log-slave-updates on the slave/master system.


your question has the
                       master
                     /               \
             existing           new slave
0

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Parts and Products table schema in mysql 6 59
MySqlDump not dumping triggers 1 43
mysql ide 10 44
Import MySQL data into MS Access using VB.Net interface 5 26
More Fun with XML and MySQL – Parsing Delimited String with a Single SQL Statement Are you ready for another of my SQL tidbits?  Hopefully so, as in this adventure, I will be covering a topic that comes up a lot which is parsing a comma (or other…
This guide whil teach how to setup live replication (database mirroring) on 2 servers for backup or other purposes. In our example situation we have this network schema (see atachment). We need to replicate EVERY executed SQL query on server 1 to…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question