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
394 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 78

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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Containers like Docker and Rocket are getting more popular every day. In my conversations with customers, they consistently ask what containers are and how they can use them in their environment. If you’re as curious as most people, read on. . .
In this blog post, we’ll look at how ClickHouse performs in a general analytical workload using the star schema benchmark test.
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…

707 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