MariaDB Can't Create Test File
Sep 19 11:54:47 bung systemd[1]: Starting MariaDB 10.3.36 database server...
Sep 19 11:54:48 bung mysqld[14684]: 2022-09-19 11:54:48 0 [Note] /usr/sbin/mysqld (mysqld 10.3.36-MariaDB-0+deb10u1) starting as process 14684 ...
Sep 19 11:54:48 bung mysqld[14684]: 2022-09-19 11:54:48 0 [Warning] Can't create test file /var/lib/mysql/bung.lower-test
Sep 19 11:54:48 bung mysqld[14684]: [90B blob data]
Sep 19 11:54:48 bung mysqld[14684]: 2022-09-19 11:54:48 0 [ERROR] Aborting
Sep 19 11:54:48 bung systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Sep 19 11:54:48 bung systemd[1]: mariadb.service: Failed with result 'exit-code'.
Sep 19 11:54:48 bung systemd[1]: Failed to start MariaDB 10.3.36 database server.
How to fix the issue?
Made the following changes in the file /usr/lib/systemd/system/mariadb.service
or /lib/systemd/system/mariadb.service
:
Change from :
ProtectHome=true
to :
ProtectHome=false
Then restart mariadb services.