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
382 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
MYSQL simple update statement 3 51
[MYSQL]: Delete is very slow 4 68
mysql joining from the same table 6 42
MS SQL Server - Looking to filter rows based on column value 3 35
Fore-Foreword Today (2016) Maxmind has a new approach to the distribution of its data sets.  This article may be obsolete.  Instead of using the examples here, have a look at the MaxMind API (https://www.maxmind.com/en/geolite2-developer-package). …
I use MySQL for many of my development projects in a Windows environment. To manage my databases (and perform queries) for years I used a tool called MySQL administrator.  This tool has since been replaced by MySQL Workbench. So I decided to m…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

813 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

9 Experts available now in Live!

Get 1:1 Help Now