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
379 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 76

Accepted Solution

by:
arnold earned 500 total points
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Introduction In this installment of my SQL tidbits, I will be looking at parsing Extensible Markup Language (XML) directly passed as string parameters to MySQL 5.1.5 or higher. These would be instances where LOAD_FILE (http://dev.mysql.com/doc/refm…
Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now