Clear MariaDB dir after package install.

This commit is contained in:
Buster Neece 2023-01-13 01:06:37 -06:00
parent 5907f01ab8
commit ef4c7b48a4
No known key found for this signature in database
GPG Key ID: F1D2E64A0005E80E
1 changed files with 7 additions and 0 deletions

View File

@ -15,6 +15,13 @@ apt-get update
apt-get install -q -y --no-install-recommends mariadb-server mariadb-backup
rm -rf /var/lib/mysql
mkdir -p /var/lib/mysql /var/run/mysqld
chown -R mysql:mysql /var/lib/mysql /var/run/mysqld
# ensure that /var/run/mysqld (used for socket and lock files) is writable regardless of the UID our mysqld instance ends up having at runtime
chmod 777 /var/run/mysqld
# comment out a few problematic configuration values
find /etc/mysql/ -name '*.cnf' -print0 \
| xargs -0 grep -lZE '^(bind-address|log|user\s)' \