?
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
Medium Priority
?
400 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
[X]
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
1 Comment
 
LVL 79

Accepted Solution

by:
arnold earned 2000 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

By, Vadim Tkachenko. In this article we’ll look at ClickHouse on its one year anniversary.
In this blog post, we’ll look at how using thread_statistics can cause high memory usage.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

752 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