Support #945
Install MariaDB 10 on Arch Linux
Description
This is a simple guide on setting up a MariaDB 10 server on Arch Linux.
Prepare the Environment¶
- Make sure the system is up to date:
pacman -Syu
Install MariaDB server¶
- Start by installing the mariadb server and mariadb-clients packages:
pacman -S mariadb{,-clients}
- Initialize the database:
mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
- Enable and start MariaDB
systemctl enable mariadb systemctl start mariadb
- Prepare the database for use by running the secure installation:
mysql_secure_installation
- NOTE: Choose a strong root password and answer yes to all questions.
Create MariaDB Databases and Users¶
- Login to MariaDB and create appropriate databases and users.
mysql -u root -p
- and run the following SQL queries to create the somedb database and someuser user:
CREATE DATABASE somedb CHARACTER SET utf8; CREATE USER 'someuser'@'localhost' IDENTIFIED BY 'SuperSecretPassword'; GRANT ALL PRIVILEGES ON somedb.* TO 'someuser'@'localhost'; FLUSH PRIVILEGES; quit
- and run the following SQL queries to create the somedb database and someuser user: