How to Install MariaDB on Ubuntu 16
MariaDB is a backwards-compatible MySQL community fork with many enhancements. For starters, it includes a variety of additional storage engines, including some with NoSQL and graph capabilities. It also features various performance enhancements, along with high availability features that typically make it the superior choice for integrating with MySQL applications. Since it is MySQL-compatible, it can capitalize on the large ecosystem of MySQL extensions and apps, making it a drop-in replacement for MySQL in many circumstances. If you’re in a situation where MySQL is your performance bottleneck, updating to MariaDB may be the perfect solution. Not only might one of its many storage engines be a better fit for your workload, but you may be able to add in additional database instances to horizontally scale performance.
When this installation is complete, you can continue on and install apps or services that depend on MySQL, or can build out your installation by creating additional servers to cluster together.
Begin by updating your Ubuntu installation. We’ll upgrade the list of packages, and will also apply any current security patches and bugfixes. This step should be done regularly to keep your server secure and performant. Neglecting to do so may result in security breaches or other system issues.
apt-get update && apt-get upgrade -y
We’ll now install the MariaDB server package.
apt-get install mariadb-server -y
With MariaDB installed, we must now turn to security. The next step will perform some basic hardening on the newly-installed database server.
Let’s see if the database server itself is working.
mysql -u root -p
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 50
Server version: 10.0.25-MariaDB-0ubuntu0.16.04.1 Ubuntu 16.04
Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
You now have a single-node, secure instance. It is ready to integrate with any MySQL-compatible apps, or to be clustered with other instances in a highly-available setup. If this guide was helpful to you, kindly share it with others who may also be interested.