Best way to extend mysql database between two or more servers

March 28, 2016 4.7k views
Ubuntu MySQL PHP DigitalOcean Scaling PHP Frameworks Configuration Management Clustering Deployment High Availability

I want a setup where I have a mysql server that is spread across more then one server, so then if I fill up one server it starts adding the rest of the database onto the next server and so on. What’s the best way to do this digital ocean and should I be hosting data such as lots of images and content on digital ocean?

1 Answer

Hey there,

There are a few ways to think about this issue. You may be able to spread the database across multiple storage options in the near future, not necessarily separate servers. I wouldn’t recommend including the images into the database if you already plan on having a large database.

If you want to copy the database to multiple servers for redundancy, I would recommend reviewing this tutorial about database replication.

Happy coding,

Jon Schwenn
Platform Support Specialist

by Etel Sverdlov
MySQL replication is a process that allows you to easily maintain multiple copies of a MySQL data by having them copied automatically from a master to a slave database. This can helpful for many reasons including facilating a backup for the data,a way to analyze it without using the main database, or simply as a means to scale out. This tutorial will cover a very simple example of mysql replication—one master will send information to a single slave.
Have another answer? Share your knowledge.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!