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:
Looking for the right web hosting solution for your website can be an intimidating task. Options nowadays are more diversified than ever, and each year brings new developments in the web hosting market. If you have no clue of what to look out for, you can find yourself overwhelmed with...
Content marketing continues to be one of the most valuable tools for today’s online businesses. With content, you can improve your chances of reaching your target audience, boost your search engine standing, and even unlock new opportunities for sales. The more content you produce, the more you can strengthen your...
User Experience (UX) is one of the most crucial factors to consider in web design. As the number of websites and applications in the world today continues to accelerate, businesses are under more pressure than ever to impress customers straight away. If a user visits your website and finds slow-loading...