MariaDB is a drop in replacement for MySQL because it is a scalable, robust and reliable SQL server that comes rich set of enhancements.
Replication is the process of copying database automatically from master to slave server. If one server goes down, then you can still access the data from second server.
You can easily solve a number of problems with performance and backup using master slave replication. You can also split up the load of database queries across multiple database servers.
In this tutorial, we will learn how to configure MariaDB master slave replication between two Ubuntu 16.04 host.
Two servers running Ubuntu 16.04.
Static IP address 192.168.15.237 configured on master server.
Static IP address 192.168.15.100 configured on slave server.
A non-root user with sudo privileges configure on both server.
Before starting, you will need to update the system with the latest version. You can do this by runnng the following command:
sudo apt-get update -ysudo apt-get upgrade -y
Once your system is up to date, you can proceed to next step.
First, you will need to install the latest version of MariaDB database server on both master and slave server.
You can install MariaDB server easily using the following command:
sudo apt-get install mariadb-server
Once MariaDb is installed, you will need to secure it first, because default MariaDB installation is not secure.
You can secure it by running the mysql_secure_installation script on both master and slave server.
The above script will ask you to set a root password for your MariaDB installation, remove default test database and remove anonymous users.
Answer each questions carefully.
Once MariaDb installation is secured, start MariaDB service and let it to start automatically on every reboot by running the following command:
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...