You can setup two types of replication in MySQL. First is the master master replication and other one is master slave replication.
But master slave replication provides only load balancing for the databases, it does not provide failover. It means if your master server goes down, you can not execute queries directly on the slave server. In master master replication, it will allows data to be copied from one server to the other. This will adds redundancy and increases efficiency when accessing database.
In this tutorial, we will learn how to configure mysql master master replication between two Ubuntu 16.04 host.
Two server running Ubuntu 16.04.
Static IP address 192.168.15.237 configured on first master server.
Static IP address 192.168.15.100 configured on second master server.
A non-root user with sudo privileges configure on both server.
Install and Configure MySQL on First Master Server
First, you will need to install mysql server and client on first server. You can install it with the following command:
sudo apt-get install mysql-server mysql-client
Next, you will need to make some changes in my.cnf file:
Truth be told, it’s difficult for a web application that doesn’t have some kind of identification, even if you don’t see it as a security measure in and of itself. The Internet is a kind of lawless land, and even on free services like Google’s, authentication ensures that abuses will...
Although data persistence is almost always a fundamental element of applications, Node.js has no native integration with databases. Everything is delegated to third-party libraries to be included manually, in addition to the standard APIs. Although MongoDB and other non-relational databases are the most common choice with Node because if you...