How to install MariaDB on Arch Linux 2017

install mariadb on arch linux

Arch Linux Tutorial – This tutorial will show you how to install MariaDB on Arch Linux 2017. MariaDB is fork of MySQL Server which is free, open source and yet powerful. MariaDB has been used by millions of websites or companies all over the world. Installing MariaDB on Arch Linux 2017 is pretty simple. Its available on Pacman repository.

install mariadb on arch linux

For further reading about MySQL on Arch Linux, please visit the official ArchWiki of MySQL. MariaDB can be implemented on many aspects such as websites, GIS purposes and many other SQL data storage.

Prerequisites

  • root access to Arch Linux system
  • internet connection
  • basic understanding of Linux command

Steps to install MariaDB on Arch Linux 2017

Step 1. Update your system

sudo pacman -Syu

Step 2. Install MariaDB

sudo pacman -S mariadb

Sample output:

[dhani@archServer /]$ sudo pacman -S mariadb
[sudo] password for dhani: 
resolving dependencies...
looking for conflicting packages...

Packages (6) boost-libs-1.64.0-4  jemalloc-1:5.0.1-3  libevent-2.1.8-1  libmariadbclient-10.1.25-1
             mariadb-clients-10.1.25-1  mariadb-10.1.25-1

Total Download Size:    34.31 MiB
Total Installed Size:  239.91 MiB

:: Proceed with installation? [Y/n]

Configure MariaDB

After install, do not start the mariadb service. We need to configure the mariadb first

sudo mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql

Now start mariadb service

sudo systemctl start mariadb

Secure MySQL Installation

mysql_secure_installation

Output:

[dhani@archServer /]$ sudo mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current
password for the root user.  If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none): 
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.

Set root password? [Y/n] y
New password: 
Re-enter new password: 
Password updated successfully!
Reloading privilege tables..
 ... Success!


By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.
Remove test database and access to it? [Y/n] y
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] y
 ... Success!

Cleaning up...

All done!  If you've completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB!

At this point our MariaDB server is up and running. Thanks for reading this how to install MariaDB on Arch Linux 2017. See on the other tutorial.

Be the first to comment

Leave a Reply

Your email address will not be published.


*


This site uses Akismet to reduce spam. Learn how your comment data is processed.