cannot start mariadb after migration on centos7(Note: my.cnf changed)

[root@localhost ]# systemctl status mariadb.service -l â mariadb.service - MariaDB 10.3.31 database server Loaded: loaded (/usr/lib/systemd/system/mariadb.service; disabled; vendor preset: disabled) Drop-In: /etc/systemd/system/mariadb.service.d ââmigrated-from-my.cnf-settings.conf Active: failed (Result: exit-code) since Mon 2021-09-20 14:29:38 +04; 28s ago Docs: man:mysqld(8) https://mariadb.com/kb/en/library/systemd/ Process: 1839 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, statu s=1/FAILURE) Process: 1818 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=`cd /usr/bin/..; /usr/bin/g alera_recovery`; [ $? -eq 0 ] && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, status =0/SUCCESS) Process: 1814 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCE SS) Main PID: 1839 (code=exited, status=1/FAILURE) Status: "MariaDB server is down"

Sep 20 14:29:38 localhost.localdomain systemd[1]: Starting MariaDB 10.3.31 database server... Sep 20 14:29:38 localhost.localdomain mysqld[1839]: 2021-09-20 14:29:38 0 [Note] /usr/sbin/mysqld (mysqld 10.3.31-Mari aDB) starting as process 1839 ... Sep 20 14:29:38 localhost.localdomain mysqld[1839]: 2021-09-20 14:29:38 0 [Warning] Can't create test file /mnt/data/m ysql/localhost.lower-test Sep 20 14:29:38 localhost.localdomain mysqld[1839]: [91B blob data] Sep 20 14:29:38 localhost.localdomain mysqld[1839]: 2021-09-20 14:29:38 0 [ERROR] Aborting Sep 20 14:29:38 localhost.localdomain systemd[1]: mariadb.service: main process exited, code=exited, status=1/FAILURE Sep 20 14:29:38 localhost.localdomain systemd[1]: Failed to start MariaDB 10.3.31 database server. Sep 20 14:29:38 localhost.localdomain systemd[1]: Unit mariadb.service entered failed state. Sep 20 14:29:38 localhost.localdomain systemd[1]: mariadb.service failed.

Sep 20 14:30:01 localhost.localdomain CROND[1858]: (root) CMD (/usr/lib64/sa/sa1 1 1) Sep 20 14:32:04 localhost.localdomain polkitd[1134]: Registered Authentication Agent for unix-process:2064:34538292 (system bus nam Sep 20 14:32:04 localhost.localdomain systemd[1]: Starting MariaDB 10.3.31 database server... -- Subject: Unit mariadb.service has begun start-up -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit mariadb.service has begun starting up. Sep 20 14:32:04 localhost.localdomain mysqld[2095]: 2021-09-20 14:32:04 0 [Note] /usr/sbin/mysqld (mysqld 10.3.31-MariaDB) starting Sep 20 14:32:04 localhost.localdomain mysqld[2095]: 2021-09-20 14:32:04 0 [Warning] Can't create test file /mnt/data/mysql/localhos Sep 20 14:32:04 localhost.localdomain mysqld[2095]: [91B blob data] Sep 20 14:32:04 localhost.localdomain mysqld[2095]: 2021-09-20 14:32:04 0 [ERROR] Aborting Sep 20 14:32:04 localhost.localdomain systemd[1]: mariadb.service: main process exited, code=exited, status=1/FAILURE Sep 20 14:32:04 localhost.localdomain systemd[1]: Failed to start MariaDB 10.3.31 database server. -- Subject: Unit mariadb.service has failed -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit mariadb.service has failed. -- -- The result is failed. Sep 20 14:32:04 localhost.localdomain systemd[1]: Unit mariadb.service entered failed state. Sep 20 14:32:04 localhost.localdomain systemd[1]: mariadb.service failed. Sep 20 14:32:04 localhost.localdomain polkitd[1134]: Unregistered Authentication Agent for unix-process:2064:34538292 (system bus n

Answer Answered by Daniel Black in this comment.

/mnt/data/mysql needs to permission fixes for MariaDB to write to this.

This could be SELinux error that is easy to fix. Otherwise see this help page.

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.