-
-
Notifications
You must be signed in to change notification settings - Fork 3
Arch Linux Database Servers
Mattscreative edited this page Dec 5, 2025
·
2 revisions
Complete beginner-friendly guide to database servers on Arch Linux, including PostgreSQL, MySQL, MariaDB, MongoDB, and SQLite.
Install PostgreSQL:
# Install PostgreSQL
sudo pacman -S postgresql
# Initialize database
sudo -u postgres initdb -D /var/lib/postgres/data
# Enable service
sudo systemctl enable postgresql
sudo systemctl start postgresqlConfigure PostgreSQL:
# Edit config
sudo vim /var/lib/postgres/data/postgresql.conf
# Edit pg_hba.conf
sudo vim /var/lib/postgres/data/pg_hba.confInstall MariaDB:
# Install MariaDB
sudo pacman -S mariadb
# Initialize database
sudo mariadb-install-db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
# Enable service
sudo systemctl enable mariadb
sudo systemctl start mariadb
# Secure installation
sudo mysql_secure_installationUse MySQL:
# Connect
mysql -u root -p
# Or MariaDB
mariadb -u root -pInstall MongoDB:
# Install MongoDB
yay -S mongodb-bin
# Enable service
sudo systemctl enable mongodb
sudo systemctl start mongodbUse MongoDB:
# Connect
mongo
# Or mongosh
mongoshInstall SQLite:
# Install SQLite
sudo pacman -S sqlite
# Create database
sqlite3 database.db
# Or use in applicationsInstall phpPgAdmin:
# Install phpPgAdmin
sudo pacman -S phppgadminInstall phpMyAdmin:
# Install phpMyAdmin
sudo pacman -S phpmyadminInstall DBeaver:
# Install DBeaver
yay -S dbeaverThis guide covered PostgreSQL, MySQL/MariaDB, MongoDB, SQLite, and database tools.
- Arch Linux Development Environment - Development
- Arch Linux Web Servers - Web servers
- ArchWiki Database Servers: https://wiki.archlinux.org/title/List_of_applications/Databases
This guide is based on the ArchWiki. For the most up-to-date information, always refer to the official ArchWiki.