Install
Back on brandybuck as mountdoom, install MariaDB
BASH
sudo apt install -y mariadb-server
Connect
BASH
sudo mariadb
Create the Pixelfed database
SQL
CREATE DATABASE pixelfeddb;
Create a dedicated user (change maria_db_password)
SQL
CREATE USER 'pixelfed'@'localhost' IDENTIFIED BY 'maria_db_password';
SQL
GRANT ALL PRIVILEGES ON pixelfeddb.* TO 'pixelfed'@'localhost';
SQL
FLUSH PRIVILEGES;
quit
Troubleshootings
If Mariadb fails to install, stop the server and clean up
BASH
sudo systemctl stop mariadb
Remove all MariaDB-related packages and their configuration files
BASH
sudo apt purge mariadb-server mariadb-client mariadb-common
Delete leftover configuration and data directories
BASH
sudo rm -r /etc/mysql
sudo rm -r /var/lib/mysql
sudo rm -r /var/log/mysql
Remove unused dependencies
BASH
sudo apt autoremove
sudo apt autoclean
Ensure no broken packages remain
BASH
sudo apt --fix-broken install
Remove dedicated user and group
BASH
sudo deluser -r mysql
sudo delgroup mysql