November 11, 2022

MariaDB Can't Create Test File

Activities, Android Developer, Ansible, Apache2, Atlassian, Ayo Belajar Linux, Bestpath Network, BLC Telkom Klaten, BSD, Caddy Server, Case Study, Cisco, Cisco Indonesia, Cloud Computing, Cockpit, Custom Weapons, Docker, E-Learning, Engenius, Error, FreeBSD, FreeBSD Indonesia, Komunitas Pengguna Linux Indonesia, KPLI Bulukumba, KPLI Klaten, Lets Encrypt, Linux, MacOS, Microsoft Azure, Microsoft SQL Server, MikroTik, MikroTik Indonesia, MySQL, Nginx, Open edX, OpenSID, Others, PHP, phpMyAdmin, PostgreSQL, Proxmox, Python, Redash, Sendy, SSH, Stories, Subnetting, TP-Link, Ubiquiti, Unix, Virtualization, Windows, X-Mosque, Faizar Septiawan, Icar, siBunglonGanteng, Orang Ganteng, siBunglonLabs

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.