Hi, Joulinar could you also help me with this problem? I have exactly same error like Fabio, but today before i want to uninstall Nextcloud (I installed it 2 months ago but didnt even use it) I was just checking settings in dietpi and saw that MardiDB service “failed”. I restarted system and services but it still shows failed.
This is what I got after running your commands:
root@DietPi:~# systemctl restart mariadb.service
Job for mariadb.service failed because the control process exited with error code.
See "systemctl status mariadb.service" and "journalctl -xe" for details.
root@DietPi:~# systemctl status mariadb.service
● mariadb.service - MariaDB 10.3.27 database server
Loaded: loaded (/lib/systemd/system/mariadb.service; disabled; vendor preset:
enabled)
Drop-In: /etc/systemd/system/mariadb.service.d
└─dietpi-services_edit.conf
Active: failed (Result: exit-code) since Mon 2021-03-01 11:59:12 C
ET; 54s ago
Docs: man:mysqld(8)
https://mariadb.com/kb/en/library/systemd/
Process: 6332 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/ru
n/mysqld (code=exited, status=0/SUCCESS)
Process: 6333 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START
_POSITION (code=exited, status=0/SUCCESS)
Process: 6335 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR
= || VAR=`cd /usr/bin/..; /usr/bin/galera_recovery`; [ $? -eq 0 ] && systemc
tl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, status=0/S
UCCESS)
Process: 6391 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WS
REP_START_POSITION (code=exited, status=1/FAILURE)
Main PID: 6391 (code=exited, status=1/FAILURE)
Status: "MariaDB server is down"
mar 01 11:59:10 DietPi systemd[1]: Starting MariaDB 10.3.27 database server...
mar 01 11:59:10 DietPi mysqld[6391]: 2021-03-01 11:59:10 0 [Note] /usr/sbin/mysq
ld (mysqld 10.3.27-MariaDB-0+deb10u1) starting as process 6391 ...
mar 01 11:59:10 DietPi mysqld[6391]: 2021-03-01 11:59:10 0 [Warning] Could not i
ncrease number of max_open_files to more than 16384 (request: 32186)
mar 01 11:59:10 DietPi mysqld[6391]: 2021-03-01 11:59:10 0 [Warning] Can't creat
e test file /var/lib/mysql/DietPi.lower-test
mar 01 11:59:12 DietPi systemd[1]: mariadb.service: Main
process exited, code=exited, status=1/FAILURE
mar 01 11:59:12 DietPi systemd[1]: mariadb.service: Fail
ed with result 'exit-code'.
mar 01 11:59:12 DietPi systemd[1]: Failed to start Maria
DB 10.3.27 database server.
root@DietPi:~# systemctl restart mariadb.service
Job for mariadb.service failed because the control process exited with error code.
See "systemctl status mariadb.service" and "journalctl -xe" for details.
root@DietPi:~# journalctl -u mariadb
-- Logs begin at Mon 2021-03-01 11:50:30 CET, end at Mon 2021-03-01 12:02:30 CET
. --
mar 01 11:51:01 DietPi systemd[1]: Starting MariaDB 10.3.27 database server...
mar 01 11:51:01 DietPi mysqld[1516]: 2021-03-01 11:51:01 0 [Note] /usr/sbin/mysq
ld (mysqld 10.3.27-MariaDB-0+deb10u1) starting as process 1516 ...
mar 01 11:51:01 DietPi mysqld[1516]: 2021-03-01 11:51:01 0 [Warning] Could not i
ncrease number of max_open_files to more than 16384 (request: 32186)
mar 01 11:51:01 DietPi mysqld[1516]: 2021-03-01 11:51:01 0 [Warning] Can't creat
e test file /var/lib/mysql/DietPi.lower-test
mar 01 11:51:01 DietPi mysqld[1516]: [97B blob data]
mar 01 11:51:01 DietPi mysqld[1516]: 2021-03-01 11:51:01 0 [ERROR] Aborting
mar 01 11:51:01 DietPi systemd[1]: mariadb.service: Main
process exited, code=exited, status=1/FAILURE
mar 01 11:51:01 DietPi systemd[1]: mariadb.service: Fail
ed with result 'exit-code'.
mar 01 11:51:01 DietPi systemd[1]: Failed to start Maria
DB 10.3.27 database server.
mar 01 11:52:50 DietPi systemd[1]: Starting MariaDB 10.3.27 database server...
mar 01 11:52:50 DietPi mysqld[2632]: 2021-03-01 11:52:50 0 [Note] /usr/sbin/mysq
ld (mysqld 10.3.27-MariaDB-0+deb10u1) starting as process 2632 ...
mar 01 11:52:50 DietPi mysqld[2632]: 2021-03-01 11:52:50 0 [Warning] Could not i
ncrease number of max_open_files to more than 16384 (request: 32186)
mar 01 11:52:50 DietPi mysqld[2632]: 2021-03-01 11:52:50 0 [Warning] Can't creat
e test file /var/lib/mysql/DietPi.lower-test
mar 01 11:52:50 DietPi mysqld[2632]: [97B blob data]
mar 01 11:52:50 DietPi mysqld[2632]: 2021-03-01 11:52:50 0 [ERROR] Aborting
mar 01 11:52:50 DietPi systemd[1]: mariadb.service: Main
process exited, code=exited, status=1/FAILURE
mar 01 11:52:50 DietPi systemd[1]: mariadb.service: Fail
ed with result 'exit-code'.
mar 01 11:52:50 DietPi systemd[1]: Failed to start Maria
DB 10.3.27 database server.
mar 01 11:57:11 DietPi systemd[1]: Starting MariaDB 10.3.27 database server...
mar 01 11:57:11 DietPi mysqld[5265]: 2021-03-01 11:57:11 0 [Note] /usr/sbin/mysq
ld (mysqld 10.3.27-MariaDB-0+deb10u1) starting as process 5265 ...
mar 01 11:57:11 DietPi mysqld[5265]: 2021-03-01 11:57:11 0 [Warning] Could not i
ncrease number of max_open_files to more than 16384 (request: 32186)
mar 01 11:57:11 DietPi mysqld[5265]: 2021-03-01 11:57:11 0 [Warning] Can't creat
e test file /var/lib/mysql/DietPi.lower-test
mar 01 11:57:13 DietPi systemd[1]: mariadb.service: Main
process exited, code=exited, status=1/FAILURE
mar 01 11:57:13 DietPi systemd[1]: mariadb.service: Fail
ed with result 'exit-code'.
mar 01 11:57:13 DietPi systemd[1]: Failed to start Maria
DB 10.3.27 database server.
mar 01 11:59:10 DietPi systemd[1]: Starting MariaDB 10.3.27 database server...
mar 01 11:59:10 DietPi mysqld[6391]: 2021-03-01 11:59:10 0 [Note] /usr/sbin/mysq
ld (mysqld 10.3.27-MariaDB-0+deb10u1) starting as process 6391 ...
mar 01 11:59:10 DietPi mysqld[6391]: 2021-03-01 11:59:10 0 [Warning] Could not i
ncrease number of max_open_files to more than 16384 (request: 32186)
mar 01 11:59:10 DietPi mysqld[6391]: 2021-03-01 11:59:10 0 [Warning] Can't creat
e test file /var/lib/mysql/DietPi.lower-test
mar 01 11:59:12 DietPi systemd[1]: mariadb.service: Main
process exited, code=exited, status=1/FAILURE
mar 01 11:59:12 DietPi systemd[1]: mariadb.service: Fail
ed with result 'exit-code'.
mar 01 11:59:12 DietPi systemd[1]: Failed to start Maria
DB 10.3.27 database server.
mar 01 12:02:28 DietPi systemd[1]: Starting MariaDB 10.3.27 database server...
mar 01 12:02:28 DietPi mysqld[6531]: 2021-03-01 12:02:28 0 [Note] /usr/sbin/mysq
ld (mysqld 10.3.27-MariaDB-0+deb10u1) starting as process 6531 ...
mar 01 12:02:28 DietPi mysqld[6531]: 2021-03-01 12:02:28 0 [Warning] Could not i
ncrease number of max_open_files to more than 16384 (request: 32186)
mar 01 12:02:28 DietPi mysqld[6531]: 2021-03-01 12:02:28 0 [Warning] Can't creat
e test file /var/lib/mysql/DietPi.lower-test
mar 01 12:02:30 DietPi systemd[1]: mariadb.service: Main
process exited, code=exited, status=1/FAILURE
mar 01 12:02:30 DietPi systemd[1]: mariadb.service: Fail
ed with result 'exit-code'.
mar 01 12:02:30 DietPi systemd[1]: Failed to start Maria
DB 10.3.27 database server.
root@DietPi:~# cat /var/log/mysql/error.log
2021-03-01 11:57:11 0 [ERROR] mysqld: Can't create/write to file '/var/lib/mysql/aria_log_control' (Errcode: 13 "Permission denied")
2021-03-01 11:57:11 0 [ERROR] mysqld: Got error 'Can't create file' when trying to use aria control file '/var/lib/mysql/aria_log_control'
2021-03-01 11:57:11 0 [ERROR] Plugin 'Aria' init function returned error.
2021-03-01 11:57:11 0 [ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.
2021-03-01 11:57:11 0 [Note] InnoDB: Using Linux native AIO
2021-03-01 11:57:11 0 [Note] InnoDB: The first innodb_system data file 'ibdata1' did not exist. A new tablespace will be created!
2021-03-01 11:57:11 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2021-03-01 11:57:11 0 [Note] InnoDB: Uses event mutexes
2021-03-01 11:57:11 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2021-03-01 11:57:11 0 [Note] InnoDB: Number of pools: 1
2021-03-01 11:57:11 0 [Note] InnoDB: Using generic crc32 instructions
2021-03-01 11:57:11 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2021-03-01 11:57:11 0 [Note] InnoDB: Completed initialization of buffer pool
2021-03-01 11:57:11 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2021-03-01 11:57:11 0 [ERROR] InnoDB: Operating system error number 13 in a file operation.
2021-03-01 11:57:11 0 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory.
2021-03-01 11:57:11 0 [ERROR] InnoDB: Operating system error number 13 in a file operation.
2021-03-01 11:57:11 0 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory.
2021-03-01 11:57:11 0 [ERROR] InnoDB: Cannot open datafile './ibdata1'
2021-03-01 11:57:11 0 [ERROR] InnoDB: Could not open or create the system tablespace. If you tried to add new data files to the system tablespace, and it failed here, you should now edit innodb_data_file_path in my.cnf back to what it was, and remove the new ibdata files InnoDB created in this failed attempt. InnoDB only wrote those files full of zeros, but did not yet use them in any way. But be careful: do not remove old data files which contain your precious data!
2021-03-01 11:57:11 0 [ERROR] InnoDB: Database creation was aborted with error Cannot open a file. You may need to delete the ibdata1 file before trying to start up again.
2021-03-01 11:57:11 0 [Note] InnoDB: Starting shutdown...
2021-03-01 11:57:13 0 [ERROR] Plugin 'InnoDB' init function returned error.
2021-03-01 11:57:13 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2021-03-01 11:57:13 0 [Note] Plugin 'FEEDBACK' is disabled.
2021-03-01 11:57:13 0 [ERROR] Could not open mysql.plugin table. Some plugins may be not loaded
2021-03-01 11:57:13 0 [ERROR] Unknown/unsupported storage engine: InnoDB
2021-03-01 11:57:13 0 [ERROR] Aborting
Warning: Memory not freed: 392
2021-03-01 11:59:10 0 [ERROR] mysqld: Can't create/write to file '/var/lib/mysql/aria_log_control' (Errcode: 13 "Permission denied")
2021-03-01 11:59:10 0 [ERROR] mysqld: Got error 'Can't create file' when trying to use aria control file '/var/lib/mysql/aria_log_control'
2021-03-01 11:59:10 0 [ERROR] Plugin 'Aria' init function returned error.
2021-03-01 11:59:10 0 [ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.
2021-03-01 11:59:10 0 [Note] InnoDB: Using Linux native AIO
2021-03-01 11:59:10 0 [Note] InnoDB: The first innodb_system data file 'ibdata1' did not exist. A new tablespace will be created!
2021-03-01 11:59:10 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2021-03-01 11:59:10 0 [Note] InnoDB: Uses event mutexes
2021-03-01 11:59:10 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2021-03-01 11:59:10 0 [Note] InnoDB: Number of pools: 1
2021-03-01 11:59:10 0 [Note] InnoDB: Using generic crc32 instructions
2021-03-01 11:59:10 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2021-03-01 11:59:10 0 [Note] InnoDB: Completed initialization of buffer pool
2021-03-01 11:59:10 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2021-03-01 11:59:10 0 [ERROR] InnoDB: Operating system error number 13 in a file operation.
2021-03-01 11:59:10 0 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory.
2021-03-01 11:59:10 0 [ERROR] InnoDB: Operating system error number 13 in a file operation.
2021-03-01 11:59:10 0 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory.
2021-03-01 11:59:10 0 [ERROR] InnoDB: Cannot open datafile './ibdata1'
2021-03-01 11:59:10 0 [ERROR] InnoDB: Could not open or create the system tablespace. If you tried to add new data files to the system tablespace, and it failed here, you should now edit innodb_data_file_path in my.cnf back to what it was, and remove the new ibdata files InnoDB created in this failed attempt. InnoDB only wrote those files full of zeros, but did not yet use them in any way. But be careful: do not remove old data files which contain your precious data!
2021-03-01 11:59:10 0 [ERROR] InnoDB: Database creation was aborted with error Cannot open a file. You may need to delete the ibdata1 file before trying to start up again.
2021-03-01 11:59:11 0 [Note] InnoDB: Starting shutdown...
2021-03-01 11:59:12 0 [ERROR] Plugin 'InnoDB' init function returned error.
2021-03-01 11:59:12 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2021-03-01 11:59:12 0 [Note] Plugin 'FEEDBACK' is disabled.
2021-03-01 11:59:12 0 [ERROR] Could not open mysql.plugin table. Some plugins may be not loaded
2021-03-01 11:59:12 0 [ERROR] Unknown/unsupported storage engine: InnoDB
2021-03-01 11:59:12 0 [ERROR] Aborting
Warning: Memory not freed: 392
2021-03-01 12:02:28 0 [ERROR] mysqld: Can't create/write to file '/var/lib/mysql/aria_log_control' (Errcode: 13 "Permission denied")
2021-03-01 12:02:28 0 [ERROR] mysqld: Got error 'Can't create file' when trying to use aria control file '/var/lib/mysql/aria_log_control'
2021-03-01 12:02:28 0 [ERROR] Plugin 'Aria' init function returned error.
2021-03-01 12:02:28 0 [ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.
2021-03-01 12:02:28 0 [Note] InnoDB: Using Linux native AIO
2021-03-01 12:02:28 0 [Note] InnoDB: The first innodb_system data file 'ibdata1' did not exist. A new tablespace will be created!
2021-03-01 12:02:28 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2021-03-01 12:02:28 0 [Note] InnoDB: Uses event mutexes
2021-03-01 12:02:28 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2021-03-01 12:02:28 0 [Note] InnoDB: Number of pools: 1
2021-03-01 12:02:28 0 [Note] InnoDB: Using generic crc32 instructions
2021-03-01 12:02:28 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2021-03-01 12:02:28 0 [Note] InnoDB: Completed initialization of buffer pool
2021-03-01 12:02:28 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2021-03-01 12:02:28 0 [ERROR] InnoDB: Operating system error number 13 in a file operation.
2021-03-01 12:02:28 0 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory.
2021-03-01 12:02:28 0 [ERROR] InnoDB: Operating system error number 13 in a file operation.
2021-03-01 12:02:28 0 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory.
2021-03-01 12:02:28 0 [ERROR] InnoDB: Cannot open datafile './ibdata1'
2021-03-01 12:02:28 0 [ERROR] InnoDB: Could not open or create the system tablespace. If you tried to add new data files to the system tablespace, and it failed here, you should now edit innodb_data_file_path in my.cnf back to what it was, and remove the new ibdata files InnoDB created in this failed attempt. InnoDB only wrote those files full of zeros, but did not yet use them in any way. But be careful: do not remove old data files which contain your precious data!
2021-03-01 12:02:28 0 [ERROR] InnoDB: Database creation was aborted with error Cannot open a file. You may need to delete the ibdata1 file before trying to start up again.
2021-03-01 12:02:29 0 [Note] InnoDB: Starting shutdown...
2021-03-01 12:02:30 0 [ERROR] Plugin 'InnoDB' init function returned error.
2021-03-01 12:02:30 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2021-03-01 12:02:30 0 [Note] Plugin 'FEEDBACK' is disabled.
2021-03-01 12:02:30 0 [ERROR] Could not open mysql.plugin table. Some plugins may be not loaded
2021-03-01 12:02:30 0 [ERROR] Unknown/unsupported storage engine: InnoDB
2021-03-01 12:02:30 0 [ERROR] Aborting
Warning: Memory not freed: 392
root@DietPi:~# readlink /var/lib/mysql
/mnt/dietpi_userdata/mysql
root@DietPi:~# readlink -f /var/lib/mysql
/mnt/dietpi_userdata/mysql
Before that I even try to uninstall Nextcloud but uninstall process was very fast, that was strange.