Installing MySQL on Arch Linux

Draft (work in progress) -- AWAITING PEER REVIEW

Drupal supports many database engines like MySQL, PostgreSQL, SQLite, MySQL being the most popular among them. The database is used to store and retrieve data used by drupal. Following are the steps to install MySQL on Arch Linux.


1. To install MySQL, run the following command
sudo pacman -S mysql
Since March 2013, MariaDB has become the default implementation of MySQL in Arch repositories. Installing the package "mysql" will automatically drop in MariaDB as a replacement. MariaDB is the open source implementation of MySQL and for all practical purposes, differs from MySQL only in name

2. To start the db server, run the following command
sudo systemctl start mysqld
Similarly, to stop the server, use "stop" instead of start in the command above.

3. Run the MySQL set up script by the following command.
sudo mysql_secure_installation
The process will ask you for your current MySQL root password (not to be confused with your server password) and, since it has not yet been set, simply press enter.
When prompted, “Set root password?” type Y, and afterwards enter in your new MySQL root password.
After that it’s easiest just to say Yes to all the options asked. At the end, MySQL will reload and implement the new changes.