WordPress Beginners – Installing MariaDB Latest on Ubuntu 17.04
Want to install MariaDB on Ubuntu 17.04 / 17.10? This brief tutorial is going to show you the steps to get it done.
MariaDB is a drop-in replacement for MySQL. This means, if you rip out MySQL and install MariaDB, applications and services that depended on MySQL will still function. These application won’t know the difference.
To get MariaDB on Ubuntu, all one has to do is run the commands below:
sudo apt-get update sudo apt-get install mariadb-server mariadb-client
The commands above will install the latest stable version of MariaDB in Ubuntu default repositories.
However, if you want to install the absolute latest of MariaDB, you may have to add its repositories to your system. To do that, run the commands below to add its repository key to Ubuntu
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
Then run the commands below to add MariaDB version repository to your Ubuntu machine. Take notes of the highlighted version number ( 10.2 )in the line code below. Replace the version number appropriately. So, if the latest version number is 11.1, you replace 10.1 with it.
sudo sh -c "echo 'deb https://mirrors.evowise.com/mariadb/repo/10.2/ubuntu '$(lsb_release -cs)' main' > /etc/apt/sources.list.d/MariaDB.list"
After adding the repository, run the commands below to update and install the server
sudo apt-get update sudo apt-get install mariadb-server mariadb-client
When you’re done installing the database server above, run the commands below to secure it with a root password.
sudo mysql_secure_installation
You’ll get prompted to answer the below questions.. use this guide below to answer.
Enter current password for root (enter for none): PRESS ENTER Set root password? [Y/n] Y CREATE YOUR PASSWORD Remove anonymous users? [Y/n] Y Disallow root login remotely? [Y/n] Y Remove test database and access to it? [Y/n] Y Reload privilege tables now? [Y/n] Y
After installing MariaDB, the commands below can be used to stop, start and enable the service to always startup when the server boots up
sudo systemctl stop mariadb.service sudo systemctl start mariadb.service sudo systemctl enable mariadb.service
Congratulations! You’ve successfully installed MariaDB on Ubuntu 17.04 / 17.10.
You may also like the post below:
Lesson 7: Enable WordPress 2-Factor Authentication and Single Sign On
