Script to Install MariaDB 10.5 on Debian 11 with Boot Disk + Data Disk
Note: besure to replace /dev/sdb with the correct location of the data disk. sudo apt update sudo apt install dosfstools sudo mkfs -t ext4 /dev/sdb sudo mount /dev/sdb /mnt/mariadb-data sudo apt install mariadb-server sudo systemctl stop mariadb sudo cp -R -p /var/lib/mysql/* /mnt/mariadb-data sudo cp /etc/mysql/mariadb.conf.d/50-server.cnf /etc/mysql/mariadb.conf.d/50-server.cnf.backup sudo sed -i ‘s/\/var\/lib\/mysql/\/mnt\/mariadb-data/g; s/bind-address\s*=\s*127\.0\.0\.1/bind-address = 0.0.0.0/g’ /etc/mysql/mariadb.conf.d/50-server.cnf.backup2 … Read more