MichaIng / DietPi

Lightweight justice for your single-board computer!
https://dietpi.com/
GNU General Public License v2.0
4.9k stars 499 forks source link

MariaDB issue when installing NextCloud on DietPi #7233

Closed mss1980au closed 1 month ago

mss1980au commented 1 month ago

Warning: The unit file, source configuration file or drop-ins of mariadb.service changed on disk. Run 'systemctl daemon-reload' to reload units. Job for mariadb.service failed because the control process exited with error code. See "systemctl status mariadb.service" and "journalctl -xe" for details.

------------------------------------------------------------------------------------------------------------------------------------------
- DietPi bug report template for GitHub or forum                    -
- Please report at: https://github.com/MichaIng/DietPi/issues       -
                or: https://dietpi.com/forum/c/troubleshooting/10   -
- Copy and paste ONLY the BLUE lines below, replacing the template! -
---------------------------------------------------------------------
#### Details:
- Date           | 2024-10-03 15:16:53
- Program name   | DietPi-Software
- Command        | `systemctl restart mariadb`
- Exit code      | 1
- DietPi version | v9.7.1 (MichaIng/master)
- Distro version | bullseye (ID=6,RASPBIAN=0)
- Kernel version | `Linux DietPi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr  3 17:24:16 BST 2023 aarch64 GNU/Linux`
- Architecture   | `arm64`
- Hardware model | RPi 4 Model B (aarch64) (ID=4)
- Power supply   | (EG: RAVPower 5V 1A)
- SD card        | (EG: SanDisk Ultra 16 GB)
#### Steps to reproduce:
When trying to install NextCloud

#### Expected behaviour:
Should install NextCloud

#### Actual behaviour:
Installations stops with below 2 lines
[FAILED] DietPi-Software | systemctl restart mariadb
[FAILED] DietPi-Software | Unable to continue, DietPi-Software will now terminate.
- ...
#### Extra details:
I had to uninstall nextcloud and since then facing this issue
- ...
#### Additional logs:

Warning: The unit file, source configuration file or drop-ins of mariadb.service changed on disk. Run 'systemctl daemon-reload' to reload units. Job for mariadb.service failed because the control process exited with error code. See "systemctl status mariadb.service" and "journalctl -xe" for details.


---------------------------------------------------------------------
Joulinar commented 1 month ago

Try running systemctl daemon-reload. Once done re-run the install.

MichaIng commented 1 month ago

The reload is a warning only, so should not abort the service start. Please paste the output of:

journalctl -u mariadb
mss1980au commented 1 month ago

Try running systemctl daemon-reload. Once done re-run the install.

This does not work, same problem, see below screenshot

Error message

And after exiting, I get below message

See "systemctl status mariadb.service" and "journalctl -xe" for details. [FAILED] DietPi-Software | systemctl restart mariadb [FAILED] DietPi-Software | Unable to continue, DietPi-Software will now terminate.

mss1980au commented 1 month ago

The reload is a warning only, so should not abort the service start. Please paste the output of:

journalctl -u mariadb

See out put of this command below:

root@DietPi:~# journalctl -u mariadb
-- Journal begins at Thu 2024-10-03 14:42:51 BST, ends at Thu 2024-10-03 22:53:06 BST. --
Oct 03 14:42:55 DietPi systemd[1]: Starting LSB: Start and stop the mysql database server daemon...
Oct 03 14:42:55 DietPi mariadb[472]: /etc/init.d/mariadb: WARNING: /etc/mysql/my.cnf cannot be read. See README.Debian.gz ...
Oct 03 14:42:55 DietPi mariadb[484]:  (warning).
Oct 03 14:42:55 DietPi /etc/init.d/mariadb[486]: WARNING: /etc/mysql/my.cnf cannot be read. See README.Debian.gz
Oct 03 14:42:55 DietPi /etc/init.d/mariadb[506]: /etc/init.d/mariadb: line 130: /usr/bin/mysqld_safe: No such file or directory
Oct 03 14:45:07 DietPi /etc/init.d/mariadb[888]: 0 processes alive and '/usr/bin/mariadb-admin --defaults-file=/etc/mysql/debian.cnf ping' resulted in
Oct 03 14:45:07 DietPi /etc/init.d/mariadb[888]: Could not open required defaults file: /etc/mysql/debian.cnf
Oct 03 14:45:07 DietPi /etc/init.d/mariadb[888]: Fatal error in defaults handling. Program aborted
Oct 03 14:45:07 DietPi /etc/init.d/mariadb[888]: 
Oct 03 14:45:07 DietPi mariadb[472]: Starting MariaDB database server: mariadbd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Oct 03 14:45:07 DietPi mariadb[889]:  failed!
Oct 03 14:45:07 DietPi systemd[1]: mariadb.service: Control process exited, code=exited, status=1/FAILURE
Oct 03 14:45:07 DietPi systemd[1]: mariadb.service: Failed with result 'exit-code'.
Oct 03 14:45:07 DietPi systemd[1]: Failed to start LSB: Start and stop the mysql database server daemon.
Oct 03 14:45:07 DietPi systemd[1]: mariadb.service: Consumed 1.917s CPU time.
Oct 03 14:57:55 DietPi systemd[1]: Starting MariaDB 10.5.26 database server...
Oct 03 14:57:55 DietPi mariadbd[6115]: 2024-10-03 14:57:55 0 [Note] Starting MariaDB 10.5.26-MariaDB-0+deb11u2 source revision 7a5b8bf0f5470a13094101f0a4bdfa9e1b9ded02 server_uid kHrVzO8ckA6z3mscOV4uuLC0/Ks= as process 6115
Oct 03 14:57:55 DietPi mariadbd[6115]: 2024-10-03 14:57:55 0 [Note] InnoDB: Uses event mutexes
Oct 03 14:57:55 DietPi mariadbd[6115]: 2024-10-03 14:57:55 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
Oct 03 14:57:55 DietPi mariadbd[6115]: 2024-10-03 14:57:55 0 [Note] InnoDB: Number of pools: 1
Oct 03 14:57:55 DietPi mariadbd[6115]: 2024-10-03 14:57:55 0 [Note] InnoDB: Using ARMv8 crc32 instructions
Oct 03 14:57:55 DietPi mariadbd[6115]: 2024-10-03 14:57:55 0 [Note] InnoDB: Using Linux native AIO
Oct 03 14:57:55 DietPi mariadbd[6115]: 2024-10-03 14:57:55 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
Oct 03 14:57:55 DietPi mariadbd[6115]: 2024-10-03 14:57:55 0 [Note] InnoDB: Completed initialization of buffer pool
Oct 03 14:57:55 DietPi mariadbd[6115]: 2024-10-03 14:57:55 0 [Note] InnoDB: 128 rollback segments are active.
Oct 03 14:57:55 DietPi mariadbd[6115]: 2024-10-03 14:57:55 0 [Note] InnoDB: Creating shared tablespace for temporary tables
Oct 03 14:57:55 DietPi mariadbd[6115]: 2024-10-03 14:57:55 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
Oct 03 14:57:55 DietPi mariadbd[6115]: 2024-10-03 14:57:55 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
Oct 03 14:57:55 DietPi mariadbd[6115]: 2024-10-03 14:57:55 0 [Note] InnoDB: 10.5.26 started; log sequence number 45079; transaction id 20
Oct 03 14:57:55 DietPi mariadbd[6115]: 2024-10-03 14:57:55 0 [Note] Plugin 'FEEDBACK' is disabled.
Oct 03 14:57:55 DietPi mariadbd[6115]: 2024-10-03 14:57:55 0 [Note] InnoDB: Loading buffer pool(s) from /mnt/dietpi_userdata/mysql/ib_buffer_pool
Oct 03 14:57:55 DietPi mariadbd[6115]: 2024-10-03 14:57:55 0 [Note] InnoDB: Buffer pool(s) load completed at 241003 14:57:55
Oct 03 14:57:55 DietPi mariadbd[6115]: 2024-10-03 14:57:55 0 [Note] Server socket created on IP: '::'.
Oct 03 14:57:55 DietPi mariadbd[6115]: 2024-10-03 14:57:55 0 [Note] Reading of all Master_info entries succeeded
Oct 03 14:57:55 DietPi mariadbd[6115]: 2024-10-03 14:57:55 0 [Note] Added new Master_info '' to hash table
Oct 03 14:57:55 DietPi mariadbd[6115]: 2024-10-03 14:57:55 0 [Note] /usr/sbin/mariadbd: ready for connections.
Oct 03 14:57:55 DietPi mariadbd[6115]: Version: '10.5.26-MariaDB-0+deb11u2'  socket: '/run/mysqld/mysqld.sock'  port: 3306  Debian 11
Oct 03 14:57:56 DietPi systemd[6135]: mariadb.service: Failed to locate executable /etc/mysql/debian-start: No such file or directory
Oct 03 14:57:56 DietPi systemd[6135]: mariadb.service: Failed at step EXEC spawning /etc/mysql/debian-start: No such file or directory
Oct 03 14:57:56 DietPi systemd[1]: mariadb.service: Control process exited, code=exited, status=203/EXEC
Oct 03 14:57:56 DietPi mariadbd[6115]: 2024-10-03 14:57:56 0 [Note] /usr/sbin/mariadbd (initiated by: unknown): Normal shutdown
Oct 03 14:57:56 DietPi mariadbd[6115]: 2024-10-03 14:57:56 0 [Note] InnoDB: FTS optimize thread exiting.
Oct 03 14:57:56 DietPi mariadbd[6115]: 2024-10-03 14:57:56 0 [Note] InnoDB: Starting shutdown...
Oct 03 14:57:56 DietPi mariadbd[6115]: 2024-10-03 14:57:56 0 [Note] InnoDB: Dumping buffer pool(s) to /mnt/dietpi_userdata/mysql/ib_buffer_pool
Oct 03 14:57:56 DietPi mariadbd[6115]: 2024-10-03 14:57:56 0 [Note] InnoDB: Buffer pool(s) dump completed at 241003 14:57:56
Oct 03 14:57:56 DietPi mariadbd[6115]: 2024-10-03 14:57:56 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
Oct 03 14:57:56 DietPi mariadbd[6115]: 2024-10-03 14:57:56 0 [Note] InnoDB: Shutdown completed; log sequence number 45091; transaction id 21
Oct 03 14:57:56 DietPi mariadbd[6115]: 2024-10-03 14:57:56 0 [Note] Event Scheduler: Purging the queue. 0 events
Oct 03 14:57:56 DietPi mariadbd[6115]: 2024-10-03 14:57:56 0 [Note] /usr/sbin/mariadbd: Shutdown complete
Oct 03 14:57:56 DietPi systemd[1]: mariadb.service: Failed with result 'exit-code'.
Oct 03 14:57:56 DietPi systemd[1]: Failed to start MariaDB 10.5.26 database server.
Oct 03 14:58:04 DietPi systemd[1]: Starting MariaDB 10.5.26 database server...
Oct 03 14:58:04 DietPi mariadbd[6311]: 2024-10-03 14:58:04 0 [Note] Starting MariaDB 10.5.26-MariaDB-0+deb11u2 source revision 7a5b8bf0f5470a13094101f0a4bdfa9e1b9ded02 server_uid kHrVzO8ckA6z3mscOV4uuLC0/Ks= as process 6311
Oct 03 14:58:04 DietPi mariadbd[6311]: 2024-10-03 14:58:04 0 [Note] InnoDB: Uses event mutexes
Oct 03 14:58:04 DietPi mariadbd[6311]: 2024-10-03 14:58:04 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
Oct 03 14:58:04 DietPi mariadbd[6311]: 2024-10-03 14:58:04 0 [Note] InnoDB: Number of pools: 1
Oct 03 14:58:04 DietPi mariadbd[6311]: 2024-10-03 14:58:04 0 [Note] InnoDB: Using ARMv8 crc32 instructions
Oct 03 14:58:04 DietPi mariadbd[6311]: 2024-10-03 14:58:04 0 [Note] InnoDB: Using Linux native AIO
Oct 03 14:58:04 DietPi mariadbd[6311]: 2024-10-03 14:58:04 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
Oct 03 14:58:04 DietPi mariadbd[6311]: 2024-10-03 14:58:04 0 [Note] InnoDB: Completed initialization of buffer pool
Oct 03 14:58:04 DietPi mariadbd[6311]: 2024-10-03 14:58:04 0 [Note] InnoDB: 128 rollback segments are active.
Oct 03 14:58:04 DietPi mariadbd[6311]: 2024-10-03 14:58:04 0 [Note] InnoDB: Creating shared tablespace for temporary tables
Oct 03 14:58:04 DietPi mariadbd[6311]: 2024-10-03 14:58:04 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
Oct 03 14:58:04 DietPi mariadbd[6311]: 2024-10-03 14:58:04 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
Oct 03 14:58:04 DietPi mariadbd[6311]: 2024-10-03 14:58:04 0 [Note] InnoDB: 10.5.26 started; log sequence number 45091; transaction id 20
Oct 03 14:58:04 DietPi mariadbd[6311]: 2024-10-03 14:58:04 0 [Note] Plugin 'FEEDBACK' is disabled.
Oct 03 14:58:04 DietPi mariadbd[6311]: 2024-10-03 14:58:04 0 [Note] InnoDB: Loading buffer pool(s) from /mnt/dietpi_userdata/mysql/ib_buffer_pool
Oct 03 14:58:04 DietPi mariadbd[6311]: 2024-10-03 14:58:04 0 [Note] InnoDB: Buffer pool(s) load completed at 241003 14:58:04
Oct 03 14:58:04 DietPi mariadbd[6311]: 2024-10-03 14:58:04 0 [Note] Server socket created on IP: '::'.
Oct 03 14:58:04 DietPi mariadbd[6311]: 2024-10-03 14:58:04 0 [Note] Reading of all Master_info entries succeeded
Oct 03 14:58:04 DietPi mariadbd[6311]: 2024-10-03 14:58:04 0 [Note] Added new Master_info '' to hash table
Oct 03 14:58:04 DietPi mariadbd[6311]: 2024-10-03 14:58:04 0 [Note] /usr/sbin/mariadbd: ready for connections.
Oct 03 14:58:04 DietPi mariadbd[6311]: Version: '10.5.26-MariaDB-0+deb11u2'  socket: '/run/mysqld/mysqld.sock'  port: 3306  Debian 11
Oct 03 14:58:04 DietPi systemd[6332]: mariadb.service: Failed to locate executable /etc/mysql/debian-start: No such file or directory
Oct 03 14:58:04 DietPi systemd[6332]: mariadb.service: Failed at step EXEC spawning /etc/mysql/debian-start: No such file or directory
Oct 03 14:58:04 DietPi systemd[1]: mariadb.service: Control process exited, code=exited, status=203/EXEC
Oct 03 14:58:04 DietPi mariadbd[6311]: 2024-10-03 14:58:04 0 [Note] /usr/sbin/mariadbd (initiated by: unknown): Normal shutdown
Oct 03 14:58:04 DietPi mariadbd[6311]: 2024-10-03 14:58:04 0 [Note] InnoDB: FTS optimize thread exiting.
Oct 03 14:58:04 DietPi mariadbd[6311]: 2024-10-03 14:58:04 0 [Note] InnoDB: Starting shutdown...
Oct 03 14:58:04 DietPi mariadbd[6311]: 2024-10-03 14:58:04 0 [Note] InnoDB: Dumping buffer pool(s) to /mnt/dietpi_userdata/mysql/ib_buffer_pool
Oct 03 14:58:04 DietPi mariadbd[6311]: 2024-10-03 14:58:04 0 [Note] InnoDB: Buffer pool(s) dump completed at 241003 14:58:04
Oct 03 14:58:05 DietPi mariadbd[6311]: 2024-10-03 14:58:05 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
Oct 03 14:58:05 DietPi mariadbd[6311]: 2024-10-03 14:58:05 0 [Note] InnoDB: Shutdown completed; log sequence number 45103; transaction id 21
Oct 03 14:58:05 DietPi mariadbd[6311]: 2024-10-03 14:58:05 0 [Note] Event Scheduler: Purging the queue. 0 events
Oct 03 14:58:05 DietPi mariadbd[6311]: 2024-10-03 14:58:05 0 [Note] /usr/sbin/mariadbd: Shutdown complete
Oct 03 14:58:05 DietPi systemd[1]: mariadb.service: Failed with result 'exit-code'.
Oct 03 14:58:05 DietPi systemd[1]: Failed to start MariaDB 10.5.26 database server.
Oct 03 15:06:51 DietPi systemd[1]: Starting MariaDB 10.5.26 database server...
Oct 03 15:06:51 DietPi mariadbd[10869]: 2024-10-03 15:06:51 0 [Note] Starting MariaDB 10.5.26-MariaDB-0+deb11u2 source revision 7a5b8bf0f5470a13094101f0a4bdfa9e1b9ded02 server_uid kHrVzO8ckA6z3mscOV4uuLC0/Ks= as process 10869
Oct 03 15:06:51 DietPi mariadbd[10869]: 2024-10-03 15:06:51 0 [Note] InnoDB: Uses event mutexes
Oct 03 15:06:51 DietPi mariadbd[10869]: 2024-10-03 15:06:51 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
Oct 03 15:06:51 DietPi mariadbd[10869]: 2024-10-03 15:06:51 0 [Note] InnoDB: Number of pools: 1
Oct 03 15:06:51 DietPi mariadbd[10869]: 2024-10-03 15:06:51 0 [Note] InnoDB: Using ARMv8 crc32 instructions
Oct 03 15:06:51 DietPi mariadbd[10869]: 2024-10-03 15:06:51 0 [Note] InnoDB: Using Linux native AIO
Oct 03 15:06:51 DietPi mariadbd[10869]: 2024-10-03 15:06:51 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
Oct 03 15:06:51 DietPi mariadbd[10869]: 2024-10-03 15:06:51 0 [Note] InnoDB: Completed initialization of buffer pool
Oct 03 15:06:52 DietPi mariadbd[10869]: 2024-10-03 15:06:52 0 [Note] InnoDB: 128 rollback segments are active.
Oct 03 15:06:52 DietPi mariadbd[10869]: 2024-10-03 15:06:52 0 [Note] InnoDB: Creating shared tablespace for temporary tables
Oct 03 15:06:52 DietPi mariadbd[10869]: 2024-10-03 15:06:52 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
Oct 03 15:06:52 DietPi mariadbd[10869]: 2024-10-03 15:06:52 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
Oct 03 15:06:52 DietPi mariadbd[10869]: 2024-10-03 15:06:52 0 [Note] InnoDB: 10.5.26 started; log sequence number 45103; transaction id 20
Oct 03 15:06:52 DietPi mariadbd[10869]: 2024-10-03 15:06:52 0 [Note] Plugin 'FEEDBACK' is disabled.
Oct 03 15:06:52 DietPi mariadbd[10869]: 2024-10-03 15:06:52 0 [Note] InnoDB: Loading buffer pool(s) from /mnt/dietpi_userdata/mysql/ib_buffer_pool
Oct 03 15:06:52 DietPi mariadbd[10869]: 2024-10-03 15:06:52 0 [Note] InnoDB: Buffer pool(s) load completed at 241003 15:06:52
Oct 03 15:06:52 DietPi mariadbd[10869]: 2024-10-03 15:06:52 0 [Note] Server socket created on IP: '::'.
Oct 03 15:06:52 DietPi mariadbd[10869]: 2024-10-03 15:06:52 0 [Note] Reading of all Master_info entries succeeded
Oct 03 15:06:52 DietPi mariadbd[10869]: 2024-10-03 15:06:52 0 [Note] Added new Master_info '' to hash table
Oct 03 15:06:52 DietPi mariadbd[10869]: 2024-10-03 15:06:52 0 [Note] /usr/sbin/mariadbd: ready for connections.
Oct 03 15:06:52 DietPi mariadbd[10869]: Version: '10.5.26-MariaDB-0+deb11u2'  socket: '/run/mysqld/mysqld.sock'  port: 3306  Debian 11
Oct 03 15:06:52 DietPi systemd[10890]: mariadb.service: Failed to locate executable /etc/mysql/debian-start: No such file or directory
Oct 03 15:06:52 DietPi systemd[10890]: mariadb.service: Failed at step EXEC spawning /etc/mysql/debian-start: No such file or directory
Oct 03 15:06:52 DietPi systemd[1]: mariadb.service: Control process exited, code=exited, status=203/EXEC
Oct 03 15:06:52 DietPi mariadbd[10869]: 2024-10-03 15:06:52 0 [Note] /usr/sbin/mariadbd (initiated by: unknown): Normal shutdown
Oct 03 15:06:52 DietPi mariadbd[10869]: 2024-10-03 15:06:52 0 [Note] InnoDB: FTS optimize thread exiting.
Oct 03 15:06:52 DietPi mariadbd[10869]: 2024-10-03 15:06:52 0 [Note] InnoDB: Starting shutdown...
Oct 03 15:06:52 DietPi mariadbd[10869]: 2024-10-03 15:06:52 0 [Note] InnoDB: Dumping buffer pool(s) to /mnt/dietpi_userdata/mysql/ib_buffer_pool
Oct 03 15:06:52 DietPi mariadbd[10869]: 2024-10-03 15:06:52 0 [Note] InnoDB: Buffer pool(s) dump completed at 241003 15:06:52
Oct 03 15:06:52 DietPi mariadbd[10869]: 2024-10-03 15:06:52 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
Oct 03 15:06:52 DietPi mariadbd[10869]: 2024-10-03 15:06:52 0 [Note] InnoDB: Shutdown completed; log sequence number 45115; transaction id 21
Oct 03 15:06:52 DietPi mariadbd[10869]: 2024-10-03 15:06:52 0 [Note] Event Scheduler: Purging the queue. 0 events
Oct 03 15:06:52 DietPi mariadbd[10869]: 2024-10-03 15:06:52 0 [Note] /usr/sbin/mariadbd: Shutdown complete
Oct 03 15:06:52 DietPi systemd[1]: mariadb.service: Failed with result 'exit-code'.
Oct 03 15:06:52 DietPi systemd[1]: Failed to start MariaDB 10.5.26 database server.
Oct 03 15:10:27 DietPi systemd[1]: Starting MariaDB 10.5.26 database server...
Oct 03 15:10:28 DietPi mariadbd[14931]: 2024-10-03 15:10:28 0 [Note] Starting MariaDB 10.5.26-MariaDB-0+deb11u2 source revision 7a5b8bf0f5470a13094101f0a4bdfa9e1b9ded02 server_uid kHrVzO8ckA6z3mscOV4uuLC0/Ks= as process 14931
Oct 03 15:10:28 DietPi mariadbd[14931]: 2024-10-03 15:10:28 0 [Note] InnoDB: Uses event mutexes
Oct 03 15:10:28 DietPi mariadbd[14931]: 2024-10-03 15:10:28 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
Oct 03 15:10:28 DietPi mariadbd[14931]: 2024-10-03 15:10:28 0 [Note] InnoDB: Number of pools: 1
Oct 03 15:10:28 DietPi mariadbd[14931]: 2024-10-03 15:10:28 0 [Note] InnoDB: Using ARMv8 crc32 instructions
Oct 03 15:10:28 DietPi mariadbd[14931]: 2024-10-03 15:10:28 0 [Note] InnoDB: Using Linux native AIO
Oct 03 15:10:28 DietPi mariadbd[14931]: 2024-10-03 15:10:28 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
Oct 03 15:10:28 DietPi mariadbd[14931]: 2024-10-03 15:10:28 0 [Note] InnoDB: Completed initialization of buffer pool
Oct 03 15:10:28 DietPi mariadbd[14931]: 2024-10-03 15:10:28 0 [Note] InnoDB: 128 rollback segments are active.
Oct 03 15:10:28 DietPi mariadbd[14931]: 2024-10-03 15:10:28 0 [Note] InnoDB: Creating shared tablespace for temporary tables
Oct 03 15:10:28 DietPi mariadbd[14931]: 2024-10-03 15:10:28 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
Oct 03 15:10:28 DietPi mariadbd[14931]: 2024-10-03 15:10:28 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
Oct 03 15:10:28 DietPi mariadbd[14931]: 2024-10-03 15:10:28 0 [Note] InnoDB: 10.5.26 started; log sequence number 45115; transaction id 20
Oct 03 15:10:28 DietPi mariadbd[14931]: 2024-10-03 15:10:28 0 [Note] InnoDB: Loading buffer pool(s) from /mnt/dietpi_userdata/mysql/ib_buffer_pool
Oct 03 15:10:28 DietPi mariadbd[14931]: 2024-10-03 15:10:28 0 [Note] Plugin 'FEEDBACK' is disabled.
Oct 03 15:10:28 DietPi mariadbd[14931]: 2024-10-03 15:10:28 0 [Note] InnoDB: Buffer pool(s) load completed at 241003 15:10:28
Oct 03 15:10:28 DietPi mariadbd[14931]: 2024-10-03 15:10:28 0 [Note] Server socket created on IP: '::'.
Oct 03 15:10:28 DietPi mariadbd[14931]: 2024-10-03 15:10:28 0 [Note] Reading of all Master_info entries succeeded
Oct 03 15:10:28 DietPi mariadbd[14931]: 2024-10-03 15:10:28 0 [Note] Added new Master_info '' to hash table
Oct 03 15:10:28 DietPi mariadbd[14931]: 2024-10-03 15:10:28 0 [Note] /usr/sbin/mariadbd: ready for connections.
Oct 03 15:10:28 DietPi mariadbd[14931]: Version: '10.5.26-MariaDB-0+deb11u2'  socket: '/run/mysqld/mysqld.sock'  port: 3306  Debian 11
Oct 03 15:10:28 DietPi systemd[14952]: mariadb.service: Failed to locate executable /etc/mysql/debian-start: No such file or directory
Oct 03 15:10:28 DietPi systemd[14952]: mariadb.service: Failed at step EXEC spawning /etc/mysql/debian-start: No such file or directory
Oct 03 15:10:28 DietPi systemd[1]: mariadb.service: Control process exited, code=exited, status=203/EXEC
Oct 03 15:10:28 DietPi mariadbd[14931]: 2024-10-03 15:10:28 0 [Note] /usr/sbin/mariadbd (initiated by: unknown): Normal shutdown
Oct 03 15:10:28 DietPi mariadbd[14931]: 2024-10-03 15:10:28 0 [Note] InnoDB: FTS optimize thread exiting.
Oct 03 15:10:28 DietPi mariadbd[14931]: 2024-10-03 15:10:28 0 [Note] InnoDB: Starting shutdown...
Oct 03 15:10:28 DietPi mariadbd[14931]: 2024-10-03 15:10:28 0 [Note] InnoDB: Dumping buffer pool(s) to /mnt/dietpi_userdata/mysql/ib_buffer_pool
Oct 03 15:10:28 DietPi mariadbd[14931]: 2024-10-03 15:10:28 0 [Note] InnoDB: Buffer pool(s) dump completed at 241003 15:10:28
Oct 03 15:10:28 DietPi mariadbd[14931]: 2024-10-03 15:10:28 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
Oct 03 15:10:28 DietPi mariadbd[14931]: 2024-10-03 15:10:28 0 [Note] InnoDB: Shutdown completed; log sequence number 45127; transaction id 21
Oct 03 15:10:28 DietPi mariadbd[14931]: 2024-10-03 15:10:28 0 [Note] Event Scheduler: Purging the queue. 0 events
Oct 03 15:10:28 DietPi mariadbd[14931]: 2024-10-03 15:10:28 0 [Note] /usr/sbin/mariadbd: Shutdown complete
Oct 03 15:10:28 DietPi systemd[1]: mariadb.service: Failed with result 'exit-code'.
Oct 03 15:10:28 DietPi systemd[1]: Failed to start MariaDB 10.5.26 database server.
Oct 03 22:43:34 DietPi systemd[1]: Starting MariaDB 10.5.26 database server...
Oct 03 22:43:34 DietPi mariadbd[41315]: 2024-10-03 22:43:34 0 [Note] Starting MariaDB 10.5.26-MariaDB-0+deb11u2 source revision 7a5b8bf0f5470a13094101f0a4bdfa9e1b9ded02 server_uid kHrVzO8ckA6z3mscOV4uuLC0/Ks= as process 41315
Oct 03 22:43:34 DietPi mariadbd[41315]: 2024-10-03 22:43:34 0 [Note] InnoDB: Uses event mutexes
Oct 03 22:43:34 DietPi mariadbd[41315]: 2024-10-03 22:43:34 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
Oct 03 22:43:34 DietPi mariadbd[41315]: 2024-10-03 22:43:34 0 [Note] InnoDB: Number of pools: 1
Oct 03 22:43:34 DietPi mariadbd[41315]: 2024-10-03 22:43:34 0 [Note] InnoDB: Using ARMv8 crc32 instructions
Oct 03 22:43:34 DietPi mariadbd[41315]: 2024-10-03 22:43:34 0 [Note] InnoDB: Using Linux native AIO
Oct 03 22:43:34 DietPi mariadbd[41315]: 2024-10-03 22:43:34 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
Oct 03 22:43:34 DietPi mariadbd[41315]: 2024-10-03 22:43:34 0 [Note] InnoDB: Completed initialization of buffer pool
Oct 03 22:43:34 DietPi mariadbd[41315]: 2024-10-03 22:43:34 0 [Note] InnoDB: 128 rollback segments are active.
Oct 03 22:43:34 DietPi mariadbd[41315]: 2024-10-03 22:43:34 0 [Note] InnoDB: Creating shared tablespace for temporary tables
Oct 03 22:43:34 DietPi mariadbd[41315]: 2024-10-03 22:43:34 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
Oct 03 22:43:34 DietPi mariadbd[41315]: 2024-10-03 22:43:34 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
Oct 03 22:43:34 DietPi mariadbd[41315]: 2024-10-03 22:43:34 0 [Note] InnoDB: 10.5.26 started; log sequence number 45127; transaction id 20
Oct 03 22:43:34 DietPi mariadbd[41315]: 2024-10-03 22:43:34 0 [Note] Plugin 'FEEDBACK' is disabled.
Oct 03 22:43:34 DietPi mariadbd[41315]: 2024-10-03 22:43:34 0 [Note] InnoDB: Loading buffer pool(s) from /mnt/dietpi_userdata/mysql/ib_buffer_pool
Oct 03 22:43:34 DietPi mariadbd[41315]: 2024-10-03 22:43:34 0 [Note] InnoDB: Buffer pool(s) load completed at 241003 22:43:34
Oct 03 22:43:34 DietPi mariadbd[41315]: 2024-10-03 22:43:34 0 [Note] Server socket created on IP: '::'.
Oct 03 22:43:34 DietPi mariadbd[41315]: 2024-10-03 22:43:34 0 [Note] Reading of all Master_info entries succeeded
Oct 03 22:43:34 DietPi mariadbd[41315]: 2024-10-03 22:43:34 0 [Note] Added new Master_info '' to hash table
Oct 03 22:43:34 DietPi mariadbd[41315]: 2024-10-03 22:43:34 0 [Note] /usr/sbin/mariadbd: ready for connections.
Oct 03 22:43:34 DietPi mariadbd[41315]: Version: '10.5.26-MariaDB-0+deb11u2'  socket: '/run/mysqld/mysqld.sock'  port: 3306  Debian 11
Oct 03 22:43:34 DietPi systemd[41336]: mariadb.service: Failed to locate executable /etc/mysql/debian-start: No such file or directory
Oct 03 22:43:34 DietPi systemd[41336]: mariadb.service: Failed at step EXEC spawning /etc/mysql/debian-start: No such file or directory
Oct 03 22:43:34 DietPi systemd[1]: mariadb.service: Control process exited, code=exited, status=203/EXEC
Oct 03 22:43:34 DietPi mariadbd[41315]: 2024-10-03 22:43:34 0 [Note] /usr/sbin/mariadbd (initiated by: unknown): Normal shutdown
Oct 03 22:43:34 DietPi mariadbd[41315]: 2024-10-03 22:43:34 0 [Note] InnoDB: FTS optimize thread exiting.
Oct 03 22:43:34 DietPi mariadbd[41315]: 2024-10-03 22:43:34 0 [Note] InnoDB: Starting shutdown...
Oct 03 22:43:34 DietPi mariadbd[41315]: 2024-10-03 22:43:34 0 [Note] InnoDB: Dumping buffer pool(s) to /mnt/dietpi_userdata/mysql/ib_buffer_pool
Oct 03 22:43:34 DietPi mariadbd[41315]: 2024-10-03 22:43:34 0 [Note] InnoDB: Buffer pool(s) dump completed at 241003 22:43:34
Oct 03 22:43:34 DietPi mariadbd[41315]: 2024-10-03 22:43:34 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
Oct 03 22:43:34 DietPi mariadbd[41315]: 2024-10-03 22:43:34 0 [Note] InnoDB: Shutdown completed; log sequence number 45139; transaction id 21
Oct 03 22:43:34 DietPi mariadbd[41315]: 2024-10-03 22:43:34 0 [Note] Event Scheduler: Purging the queue. 0 events
Oct 03 22:43:34 DietPi mariadbd[41315]: 2024-10-03 22:43:34 0 [Note] /usr/sbin/mariadbd: Shutdown complete
Oct 03 22:43:34 DietPi systemd[1]: mariadb.service: Failed with result 'exit-code'.
Oct 03 22:43:34 DietPi systemd[1]: Failed to start MariaDB 10.5.26 database server.
Oct 03 22:53:05 DietPi systemd[1]: Starting MariaDB 10.5.26 database server...
Oct 03 22:53:05 DietPi mariadbd[44639]: 2024-10-03 22:53:05 0 [Note] Starting MariaDB 10.5.26-MariaDB-0+deb11u2 source revision 7a5b8bf0f5470a13094101f0a4bdfa9e1b9ded02 server_uid kHrVzO8ckA6z3mscOV4uuLC0/Ks= as process 44639
Oct 03 22:53:05 DietPi mariadbd[44639]: 2024-10-03 22:53:05 0 [Note] InnoDB: Uses event mutexes
Oct 03 22:53:05 DietPi mariadbd[44639]: 2024-10-03 22:53:05 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
Oct 03 22:53:05 DietPi mariadbd[44639]: 2024-10-03 22:53:05 0 [Note] InnoDB: Number of pools: 1
Oct 03 22:53:05 DietPi mariadbd[44639]: 2024-10-03 22:53:05 0 [Note] InnoDB: Using ARMv8 crc32 instructions
Oct 03 22:53:05 DietPi mariadbd[44639]: 2024-10-03 22:53:05 0 [Note] InnoDB: Using Linux native AIO
Oct 03 22:53:05 DietPi mariadbd[44639]: 2024-10-03 22:53:05 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
Oct 03 22:53:05 DietPi mariadbd[44639]: 2024-10-03 22:53:05 0 [Note] InnoDB: Completed initialization of buffer pool
Oct 03 22:53:05 DietPi mariadbd[44639]: 2024-10-03 22:53:05 0 [Note] InnoDB: 128 rollback segments are active.
Oct 03 22:53:05 DietPi mariadbd[44639]: 2024-10-03 22:53:05 0 [Note] InnoDB: Creating shared tablespace for temporary tables
Oct 03 22:53:05 DietPi mariadbd[44639]: 2024-10-03 22:53:05 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
Oct 03 22:53:05 DietPi mariadbd[44639]: 2024-10-03 22:53:05 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
Oct 03 22:53:05 DietPi mariadbd[44639]: 2024-10-03 22:53:05 0 [Note] InnoDB: 10.5.26 started; log sequence number 45139; transaction id 20
Oct 03 22:53:05 DietPi mariadbd[44639]: 2024-10-03 22:53:05 0 [Note] Plugin 'FEEDBACK' is disabled.
Oct 03 22:53:05 DietPi mariadbd[44639]: 2024-10-03 22:53:05 0 [Note] InnoDB: Loading buffer pool(s) from /mnt/dietpi_userdata/mysql/ib_buffer_pool
Oct 03 22:53:05 DietPi mariadbd[44639]: 2024-10-03 22:53:05 0 [Note] Server socket created on IP: '::'.
Oct 03 22:53:05 DietPi mariadbd[44639]: 2024-10-03 22:53:05 0 [Note] InnoDB: Buffer pool(s) load completed at 241003 22:53:05
Oct 03 22:53:05 DietPi mariadbd[44639]: 2024-10-03 22:53:05 0 [Note] Reading of all Master_info entries succeeded
Oct 03 22:53:05 DietPi mariadbd[44639]: 2024-10-03 22:53:05 0 [Note] Added new Master_info '' to hash table
Oct 03 22:53:05 DietPi mariadbd[44639]: 2024-10-03 22:53:05 0 [Note] /usr/sbin/mariadbd: ready for connections.
Oct 03 22:53:05 DietPi mariadbd[44639]: Version: '10.5.26-MariaDB-0+deb11u2'  socket: '/run/mysqld/mysqld.sock'  port: 3306  Debian 11
Oct 03 22:53:05 DietPi systemd[44659]: mariadb.service: Failed to locate executable /etc/mysql/debian-start: No such file or directory
Oct 03 22:53:05 DietPi systemd[44659]: mariadb.service: Failed at step EXEC spawning /etc/mysql/debian-start: No such file or directory
Oct 03 22:53:05 DietPi systemd[1]: mariadb.service: Control process exited, code=exited, status=203/EXEC
Oct 03 22:53:05 DietPi mariadbd[44639]: 2024-10-03 22:53:05 0 [Note] /usr/sbin/mariadbd (initiated by: unknown): Normal shutdown
Oct 03 22:53:05 DietPi mariadbd[44639]: 2024-10-03 22:53:05 0 [Note] InnoDB: FTS optimize thread exiting.
Oct 03 22:53:05 DietPi mariadbd[44639]: 2024-10-03 22:53:05 0 [Note] InnoDB: Starting shutdown...
Oct 03 22:53:05 DietPi mariadbd[44639]: 2024-10-03 22:53:05 0 [Note] InnoDB: Dumping buffer pool(s) to /mnt/dietpi_userdata/mysql/ib_buffer_pool
Oct 03 22:53:05 DietPi mariadbd[44639]: 2024-10-03 22:53:05 0 [Note] InnoDB: Buffer pool(s) dump completed at 241003 22:53:05
Oct 03 22:53:05 DietPi mariadbd[44639]: 2024-10-03 22:53:05 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
Oct 03 22:53:05 DietPi mariadbd[44639]: 2024-10-03 22:53:05 0 [Note] InnoDB: Shutdown completed; log sequence number 45151; transaction id 21
Oct 03 22:53:06 DietPi mariadbd[44639]: 2024-10-03 22:53:06 0 [Note] Event Scheduler: Purging the queue. 0 events
Oct 03 22:53:06 DietPi mariadbd[44639]: 2024-10-03 22:53:06 0 [Note] /usr/sbin/mariadbd: Shutdown complete
Oct 03 22:53:06 DietPi systemd[1]: mariadb.service: Failed with result 'exit-code'.
Oct 03 22:53:06 DietPi systemd[1]: Failed to start MariaDB 10.5.26 database server.
root@DietPi:~# 
MichaIng commented 1 month ago

It seems /etc/mysql has been removed, or several files within. Can you check this:

ls -l /etc/mysql
mss1980au commented 1 month ago

It seems /etc/mysql has been removed, or several files within. Can you check this:

ls -l /etc/mysql

Tried to change backup drive after installing Nexcloud that did not go well, so uninstalled and reinstalling Nextcloud, don't have any drives hooked up now, so just need a clean slate to Netcloud again.

see below out put of your command

root@DietPi:~# ls -l /etc/mysql total 8 -rw------- 1 root root 544 Oct 3 14:57 debian.cnf drwxr-xr-x 2 root root 4096 Oct 3 14:57 mariadb.conf.d

MichaIng commented 1 month ago

This is how it is supposed to look:

root@micha:~# l /etc/mysql/
total 24K
drwxr-xr-x 2 root root 4.0K Jul 21 21:18 conf.d
-rwxr-xr-x 1 root root 1.8K Jul  8 06:50 debian-start
-rw------- 1 root root  544 Sep 12  2022 debian.cnf
-rw-r--r-- 1 root root 1.1K May 22  2022 mariadb.cnf
drwxr-xr-x 2 root root 4.0K Sep  2 14:46 mariadb.conf.d
lrwxrwxrwx 1 root root   24 Oct 20  2020 my.cnf -> /etc/alternatives/my.cnf
-rw-r--r-- 1 root root  839 Oct 20  2020 my.cnf.fallback

Do you have a backup to restore these files from? ELse try this to restore them:

cat << '_EOF_' > /etc/apt/apt.conf.d/99temp
#clear DPkg::options;
DPkg::options:: "--force-confmiss";
_EOF_
apt install --reinstall mysql-common mariadb-client mariadb-server mariadb-common
rm /etc/apt/apt.conf.d/99temp
mss1980au commented 1 month ago

No back up, so ran your commands, its started to restore, but in the end got below:

Configuration file '/etc/mysql/mariadb.cnf', does not exist on system.
Installing new config file as you requested.
update-alternatives: using /etc/mysql/mariadb.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode
Processing triggers for mariadb-server-10.5 (1:10.5.26-0+deb11u2) ...
Failed to get unit file state for mariadb.service: Bad message
mariadb.service is a disabled or a static unit, not starting it.
root@DietPi:~# 
MichaIng commented 1 month ago

What is the state of the unit?

systemctl status mariadb
cat /lib/systemd/system/mariadb.service

Please check also for kernel errors:

dmesg -l 0,1,2,3
mss1980au commented 1 month ago
root@DietPi:~# systemctl status mariadb
cat /lib/systemd/system/mariadb.service
Warning: The unit file, source configuration file or drop-ins of mariadb.service changed on disk. Run 'systemctl daemon-reload' to reload units.
● mariadb.service - MariaDB 10.5.26 database server
     Loaded: loaded (/lib/systemd/system/mariadb.service; bad; vendor preset: enabled)
    Drop-In: /etc/systemd/system/mariadb.service.d
             └─dietpi.conf
     Active: failed (Result: exit-code) since Thu 2024-10-03 22:53:06 BST; 49min ago
       Docs: man:mariadbd(8)
             https://mariadb.com/kb/en/library/systemd/
   Main PID: 44639 (code=exited, status=0/SUCCESS)
     Status: "MariaDB server is down"
        CPU: 330ms

Oct 03 22:53:05 DietPi mariadbd[44639]: 2024-10-03 22:53:05 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
Oct 03 22:53:05 DietPi mariadbd[44639]: 2024-10-03 22:53:05 0 [Note] InnoDB: Shutdown completed; log sequence number 45151; transaction id 21
Oct 03 22:53:06 DietPi mariadbd[44639]: 2024-10-03 22:53:06 0 [Note] Event Scheduler: Purging the queue. 0 events
Oct 03 22:53:06 DietPi mariadbd[44639]: 2024-10-03 22:53:06 0 [Note] /usr/sbin/mariadbd: Shutdown complete
Oct 03 22:53:06 DietPi systemd[1]: mariadb.service: Failed with result 'exit-code'.
Oct 03 22:53:06 DietPi systemd[1]: Failed to start MariaDB 10.5.26 database server.
Oct 03 23:30:08 DietPi systemd[1]: /etc/systemd/system/mariadb.service.d/dietpi.conf:1: Invalid section header '[Unit]nBefore=cron.service'
Oct 03 23:30:09 DietPi systemd[1]: /etc/systemd/system/mariadb.service.d/dietpi.conf:1: Invalid section header '[Unit]nBefore=cron.service'
Oct 03 23:30:09 DietPi systemd[1]: /etc/systemd/system/mariadb.service.d/dietpi.conf:1: Invalid section header '[Unit]nBefore=cron.service'
Oct 03 23:41:31 DietPi systemd[1]: /etc/systemd/system/mariadb.service.d/dietpi.conf:1: Invalid section header '[Unit]nBefore=cron.service'
# It's not recommended to modify this file in-place, because it will be
# overwritten during package upgrades.  If you want to customize, the
# best way is to create a file "/etc/systemd/system/mariadb.service",
# containing
#       .include /usr/lib/systemd/system/mariadb.service
#       ...make your changes here...
# or create a file "/etc/systemd/system/mariadb.service.d/foo.conf",
# which doesn't need to include ".include" call and which will be parsed
# after the file mariadb.service itself is parsed.
#
# For more info about custom unit files, see systemd.unit(5) or
# https://mariadb.com/kb/en/mariadb/systemd/
#
# Copyright notice:
#
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.

[Unit]
Description=MariaDB 10.5.26 database server
Documentation=man:mariadbd(8)
Documentation=https://mariadb.com/kb/en/library/systemd/
After=network.target

[Install]
WantedBy=multi-user.target

[Service]

##############################################################################
## Core requirements
##

Type=notify

# Setting this to true can break replication and the Type=notify settings
# See also bind-address mariadbd option.
PrivateNetwork=false

##############################################################################
## Package maintainers
##

User=mysql
Group=mysql

# CAP_IPC_LOCK To allow memlock to be used as non-root user
# CAP_DAC_OVERRIDE To allow auth_pam_tool (which is SUID root) to read /etc/shadow when it's chmod 0
#   does nothing for non-root, not needed if /etc/shadow is u+r
# CAP_AUDIT_WRITE auth_pam_tool needs it on Debian for whatever reason
AmbientCapabilities=CAP_IPC_LOCK CAP_DAC_OVERRIDE CAP_AUDIT_WRITE
After=network.target

[Install]
WantedBy=multi-user.target

[Service]

##############################################################################
## Core requirements
##

Type=notify

# Setting this to true can break replication and the Type=notify settings
# See also bind-address mariadbd option.
PrivateNetwork=false

##############################################################################
## Package maintainers
##

User=mysql
Group=mysql

# CAP_IPC_LOCK To allow memlock to be used as non-root user
# CAP_DAC_OVERRIDE To allow auth_pam_tool (which is SUID root) to read /etc/shadow when it's chmod 0
#   does nothing for non-root, not needed if /etc/shadow is u+r
# CAP_AUDIT_WRITE auth_pam_tool needs it on Debian for whatever reason
AmbientCapabilities=CAP_IPC_LOCK CAP_DAC_OVERRIDE CAP_AUDIT_WRITE

# PrivateDevices=true implies NoNewPrivileges=true and
# SUID auth_pam_tool suddenly doesn't do setuid anymore
PrivateDevices=false

# Prevent writes to /usr, /boot, and /etc
ProtectSystem=full

# Doesn't yet work properly with SELinux enabled
# NoNewPrivileges=true

# Prevent accessing /home, /root and /run/user
ProtectHome=true

# Execute pre and post scripts as root, otherwise it does it as User=
PermissionsStartOnly=true

ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld

# Perform automatic wsrep recovery. When server is started without wsrep,
# galera_recovery simply returns an empty string. In any case, however,
# the script is not expected to return with a non-zero status.
# It is always safe to unset _WSREP_START_POSITION environment variable.
# Do not panic if galera_recovery script is not available. (MDEV-10538)
ExecStartPre=/bin/sh -c "systemctl unset-environment _WSREP_START_POSITION"
ExecStartPre=/bin/sh -c "[ ! -e /usr/bin/galera_recovery ] && VAR= || \
 VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ] \
 && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1"

# Needed to create system tables etc.
# ExecStartPre=/usr/bin/mysql_install_db -u mysql
# Start main service
# MYSQLD_OPTS here is for users to set in /etc/systemd/system/mariadb.service.d/MY_SPECIAL.conf
# Use the [Service] section and Environment="MYSQLD_OPTS=...".
# This isn't a replacement for my.cnf.
# _WSREP_NEW_CLUSTER is for the exclusive use of the script galera_new_cluster
ExecStart=/usr/sbin/mariadbd $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION

# Unset _WSREP_START_POSITION environment variable.
ExecStartPost=/bin/sh -c "systemctl unset-environment _WSREP_START_POSITION"

ExecStartPost=/etc/mysql/debian-start

KillSignal=SIGTERM

# Don't want to see an automated SIGKILL ever
SendSIGKILL=no

# Restart crashed server only, on-failure would also restart, for example, when
# my.cnf contains unknown option
Restart=on-abort
RestartSec=5s

UMask=007

##############################################################################
## USERs can override
##
##
## by creating a file in /etc/systemd/system/mariadb.service.d/MY_SPECIAL.conf
## and adding/setting the following under [Service] will override this file's
## settings.

# Useful options not previously available in [mysqld_safe]

# Kernels like killing mariadbd when out of memory because its big.
# Lets temper that preference a little.
# OOMScoreAdjust=-600

# Explicitly start with high IO priority
# BlockIOWeight=1000

# If you don't use the /tmp directory for SELECT ... OUTFILE and
# LOAD DATA INFILE you can enable PrivateTmp=true for a little more security.
PrivateTmp=false
# Start main service
# MYSQLD_OPTS here is for users to set in /etc/systemd/system/mariadb.service.d/MY_SPECIAL.conf
# Use the [Service] section and Environment="MYSQLD_OPTS=...".
# This isn't a replacement for my.cnf.
# _WSREP_NEW_CLUSTER is for the exclusive use of the script galera_new_cluster
ExecStart=/usr/sbin/mariadbd $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION

# Unset _WSREP_START_POSITION environment variable.
ExecStartPost=/bin/sh -c "systemctl unset-environment _WSREP_START_POSITION"

ExecStartPost=/etc/mysql/debian-start

KillSignal=SIGTERM

# Don't want to see an automated SIGKILL ever
SendSIGKILL=no

# Restart crashed server only, on-failure would also restart, for example, when
# my.cnf contains unknown option
Restart=on-abort
RestartSec=5s

UMask=007

##############################################################################
## USERs can override
##
##
## by creating a file in /etc/systemd/system/mariadb.service.d/MY_SPECIAL.conf
## and adding/setting the following under [Service] will override this file's
## settings.

# Useful options not previously available in [mysqld_safe]

# Kernels like killing mariadbd when out of memory because its big.
# Lets temper that preference a little.
# OOMScoreAdjust=-600

# Explicitly start with high IO priority
# BlockIOWeight=1000

# If you don't use the /tmp directory for SELECT ... OUTFILE and
# LOAD DATA INFILE you can enable PrivateTmp=true for a little more security.
PrivateTmp=false

# Set an explicit Start and Stop timeout of 900 seconds (15 minutes!)
# this is the same value as used in SysV init scripts in the past
# Galera might need a longer timeout, check the KB if you want to change this:
# https://mariadb.com/kb/en/library/systemd/#configuring-the-systemd-service-timeout
TimeoutStartSec=900
TimeoutStopSec=900

# Set the maximium number of tasks (threads) to 99% of what the system can
# handle as set by the kernel, reserve the 1% for a remote ssh connection,
# some monitoring, or that backup cron job. Without the directive this would
# be 15% (see DefaultTasksMax in systemd man pages).
TasksMax=99%

##
## Options previously available to be set via [mysqld_safe]
## that now needs to be set by systemd config files as mysqld_safe
## isn't executed.
##

# Number of files limit. previously [mysqld_safe] open-files-limit
LimitNOFILE=32768

# Maximium core size. previously [mysqld_safe] core-file-size
# LimitCore=

# Nice priority. previously [mysqld_safe] nice
# Nice=-5

# Timezone. previously [mysqld_safe] timezone
# Environment="TZ=UTC"

# Library substitutions. previously [mysqld_safe] malloc-lib with explicit paths
# (in LD_LIBRARY_PATH) and library name (in LD_PRELOAD).
# Environment="LD_LIBRARY_PATH=/path1 /path2" "LD_PRELOAD=

# Flush caches. previously [mysqld_safe] flush-caches=1
# ExecStartPre=sync
# ExecStartPre=sysctl -q -w vm.drop_caches=3
# numa-interleave=1 equalivant
# Change ExecStart=numactl --interleave=all /usr/sbin/mariadbd......

# crash-script equalivent
# FailureAction=
root@DietPi:~# 
mss1980au commented 1 month ago
root@DietPi:~# dmesg -l 0,1,2,3
[    0.622075] bcm2708_fb soc:fb: Unable to determine number of FBs. Disabling driver.
root@DietPi:~# 
MichaIng commented 1 month ago

There is one damaged file, though it should not break service start:

echo -e '[Unit]\nBefore=cron.service' > /etc/systemd/system/mariadb.service.d/dietpi.conf
systemctl daemon-reload
systemctl restart mariadb
sleep 5
journalctl -u mariadb
mss1980au commented 1 month ago

same issue still after running this, see below, I've not pasted the middle section as its too long:

root@DietPi:~# echo -e '[Unit]\nBefore=cron.service' > /etc/systemd/system/mariadb.service.d/dietpi.conf
systemctl daemon-reload
systemctl restart mariadb
sleep 5
journalctl -u mariadb
Job for mariadb.service failed because the control process exited with error code.
See "systemctl status mariadb.service" and "journalctl -xe" for details.
-- Journal begins at Thu 2024-10-03 14:42:51 BST, ends at Fri 2024-10-04 00:08:44 BST. --
Oct 03 14:42:55 DietPi systemd[1]: Starting LSB: Start and stop the mysql database server daemon...
Oct 03 14:42:55 DietPi mariadb[472]: /etc/init.d/mariadb: WARNING: /etc/mysql/my.cnf cannot be read. See README.Debian.gz ...
Oct 03 14:42:55 DietPi mariadb[484]:  (warning).
Oct 03 14:42:55 DietPi /etc/init.d/mariadb[486]: WARNING: /etc/mysql/my.cnf cannot be read. See README.Debian.gz
Oct 03 14:42:55 DietPi /etc/init.d/mariadb[506]: /etc/init.d/mariadb: line 130: /usr/bin/mysqld_safe: No such file or directory
Oct 03 14:45:07 DietPi /etc/init.d/mariadb[888]: 0 processes alive and '/usr/bin/mariadb-admin --defaults-file=/etc/mysql/debian.cnf ping' resulted in
Oct 03 14:45:07 DietPi /etc/init.d/mariadb[888]: Could not open required defaults file: /etc/mysql/debian.cnf
Oct 03 14:45:07 DietPi /etc/init.d/mariadb[888]: Fatal error in defaults handling. Program aborted
Oct 03 14:45:07 DietPi /etc/init.d/mariadb[888]: 
Oct 03 14:45:07 DietPi mariadb[472]: Starting MariaDB database server: mariadbd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Oct 03 14:45:07 DietPi mariadb[889]:  failed!
Oct 03 14:45:07 DietPi systemd[1]: mariadb.service: Control process exited, code=exited, status=1/FAILURE
Oct 03 14:45:07 DietPi systemd[1]: mariadb.service: Failed with result 'exit-code'.
Oct 03 14:45:07 DietPi systemd[1]: Failed to start LSB: Start and stop the mysql database server daemon.
Oct 03 14:45:07 DietPi systemd[1]: mariadb.service: Consumed 1.917s CPU time.

<Did not Paste- toolong>

Oct 03 22:53:06 DietPi systemd[1]: Failed to start MariaDB 10.5.26 database server.
Oct 03 23:30:08 DietPi systemd[1]: /etc/systemd/system/mariadb.service.d/dietpi.conf:1: Invalid section header '[Unit]nBefore=cron.service'
Oct 03 23:30:09 DietPi systemd[1]: /etc/systemd/system/mariadb.service.d/dietpi.conf:1: Invalid section header '[Unit]nBefore=cron.service'
Oct 03 23:30:09 DietPi systemd[1]: /etc/systemd/system/mariadb.service.d/dietpi.conf:1: Invalid section header '[Unit]nBefore=cron.service'
Oct 03 23:41:31 DietPi systemd[1]: /etc/systemd/system/mariadb.service.d/dietpi.conf:1: Invalid section header '[Unit]nBefore=cron.service'
Oct 04 00:08:44 DietPi systemd[1]: Starting MariaDB 10.5.26 database server...
Oct 04 00:08:44 DietPi mariadbd[48811]: 2024-10-04  0:08:44 0 [Note] Starting MariaDB 10.5.26-MariaDB-0+deb11u2 source revision 7a5b8bf0f5470a13094101f0a4bdfa9e1b9ded02 server_uid kHrVzO8ckA6z3mscOV4uuLC0/Ks= as process 48811
Oct 04 00:08:44 DietPi mariadbd[48811]: 2024-10-04  0:08:44 0 [Note] InnoDB: Uses event mutexes
Oct 04 00:08:44 DietPi mariadbd[48811]: 2024-10-04  0:08:44 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
Oct 04 00:08:44 DietPi mariadbd[48811]: 2024-10-04  0:08:44 0 [Note] InnoDB: Number of pools: 1
Oct 04 00:08:44 DietPi mariadbd[48811]: 2024-10-04  0:08:44 0 [Note] InnoDB: Using ARMv8 crc32 instructions
Oct 04 00:08:44 DietPi mariadbd[48811]: 2024-10-04  0:08:44 0 [Note] InnoDB: Using Linux native AIO
Oct 04 00:08:44 DietPi mariadbd[48811]: 2024-10-04  0:08:44 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
Oct 04 00:08:44 DietPi mariadbd[48811]: 2024-10-04  0:08:44 0 [Note] InnoDB: Completed initialization of buffer pool
Oct 04 00:08:44 DietPi mariadbd[48811]: 2024-10-04  0:08:44 0 [Note] InnoDB: 128 rollback segments are active.
Oct 04 00:08:44 DietPi mariadbd[48811]: 2024-10-04  0:08:44 0 [Note] InnoDB: Creating shared tablespace for temporary tables
Oct 04 00:08:44 DietPi mariadbd[48811]: 2024-10-04  0:08:44 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
Oct 04 00:08:44 DietPi mariadbd[48811]: 2024-10-04  0:08:44 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
Oct 04 00:08:44 DietPi mariadbd[48811]: 2024-10-04  0:08:44 0 [Note] InnoDB: 10.5.26 started; log sequence number 45151; transaction id 20
Oct 04 00:08:44 DietPi mariadbd[48811]: 2024-10-04  0:08:44 0 [Note] Plugin 'FEEDBACK' is disabled.
Oct 04 00:08:44 DietPi mariadbd[48811]: 2024-10-04  0:08:44 0 [Note] InnoDB: Loading buffer pool(s) from /mnt/dietpi_userdata/mysql/ib_buffer_pool
Oct 04 00:08:44 DietPi mariadbd[48811]: 2024-10-04  0:08:44 0 [Note] InnoDB: Buffer pool(s) load completed at 241004  0:08:44
Oct 04 00:08:44 DietPi mariadbd[48811]: 2024-10-04  0:08:44 0 [Note] Server socket created on IP: '::'.
Oct 04 00:08:44 DietPi mariadbd[48811]: 2024-10-04  0:08:44 0 [Note] Reading of all Master_info entries succeeded
Oct 04 00:08:44 DietPi mariadbd[48811]: 2024-10-04  0:08:44 0 [Note] Added new Master_info '' to hash table
Oct 04 00:08:44 DietPi mariadbd[48811]: 2024-10-04  0:08:44 0 [Note] /usr/sbin/mariadbd: ready for connections.
Oct 04 00:08:44 DietPi mariadbd[48811]: Version: '10.5.26-MariaDB-0+deb11u2'  socket: '/run/mysqld/mysqld.sock'  port: 3306  Debian 11
Oct 04 00:08:44 DietPi systemd[48831]: mariadb.service: Failed to locate executable /etc/mysql/debian-start: No such file or directory
Oct 04 00:08:44 DietPi systemd[48831]: mariadb.service: Failed at step EXEC spawning /etc/mysql/debian-start: No such file or directory
Oct 04 00:08:44 DietPi systemd[1]: mariadb.service: Control process exited, code=exited, status=203/EXEC
Oct 04 00:08:44 DietPi mariadbd[48811]: 2024-10-04  0:08:44 0 [Note] /usr/sbin/mariadbd (initiated by: unknown): Normal shutdown
Oct 04 00:08:44 DietPi mariadbd[48811]: 2024-10-04  0:08:44 0 [Note] InnoDB: FTS optimize thread exiting.
Oct 04 00:08:44 DietPi mariadbd[48811]: 2024-10-04  0:08:44 0 [Note] InnoDB: Starting shutdown...
Oct 04 00:08:44 DietPi mariadbd[48811]: 2024-10-04  0:08:44 0 [Note] InnoDB: Dumping buffer pool(s) to /mnt/dietpi_userdata/mysql/ib_buffer_pool
Oct 04 00:08:44 DietPi mariadbd[48811]: 2024-10-04  0:08:44 0 [Note] InnoDB: Buffer pool(s) dump completed at 241004  0:08:44
Oct 04 00:08:44 DietPi mariadbd[48811]: 2024-10-04  0:08:44 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
Oct 04 00:08:44 DietPi mariadbd[48811]: 2024-10-04  0:08:44 0 [Note] InnoDB: Shutdown completed; log sequence number 45163; transaction id 21
Oct 04 00:08:44 DietPi mariadbd[48811]: 2024-10-04  0:08:44 0 [Note] Event Scheduler: Purging the queue. 0 events
Oct 04 00:08:44 DietPi mariadbd[48811]: 2024-10-04  0:08:44 0 [Note] /usr/sbin/mariadbd: Shutdown complete
Oct 04 00:08:44 DietPi systemd[1]: mariadb.service: Failed with result 'exit-code'.
Oct 04 00:08:44 DietPi systemd[1]: Failed to start MariaDB 10.5.26 database server.
root@DietPi:~# 
MichaIng commented 1 month ago

So the reinstall seems to have been aborted before all files could have been restored. Please try like this:

cd /tmp
apt download mysql-common mariadb-client mariadb-server mariadb-common
dpkg -i --force-depends *.deb
mss1980au commented 1 month ago

ran this command, still seems mariadb.service has failed, see below:

root@DietPi:~# cd /tmp
apt download mysql-common mariadb-client mariadb-server mariadb-common
dpkg -i --force-depends *.deb
Get:1 http://ftp.au.debian.org/debian bullseye/main arm64 mysql-common all 5.8+1.0.7 [7464 B]
Get:2 https://deb.debian.org/debian-security bullseye-security/main arm64 mariadb-client all 1:10.5.26-0+deb11u2 [37.2 kB]
Get:3 https://deb.debian.org/debian-security bullseye-security/main arm64 mariadb-common all 1:10.5.26-0+deb11u2 [37.5 kB]
Get:4 https://deb.debian.org/debian-security bullseye-security/main arm64 mariadb-server all 1:10.5.26-0+deb11u2 [36.0 kB]
Fetched 118 kB in 0s (476 kB/s)      
(Reading database ... 29121 files and directories currently installed.)
Preparing to unpack mariadb-client_1%3a10.5.26-0+deb11u2_all.deb ...
Unpacking mariadb-client (1:10.5.26-0+deb11u2) over (1:10.5.26-0+deb11u2) ...
Preparing to unpack mariadb-common_1%3a10.5.26-0+deb11u2_all.deb ...
Unpacking mariadb-common (1:10.5.26-0+deb11u2) over (1:10.5.26-0+deb11u2) ...
Preparing to unpack mariadb-server_1%3a10.5.26-0+deb11u2_all.deb ...
Unpacking mariadb-server (1:10.5.26-0+deb11u2) over (1:10.5.26-0+deb11u2) ...
Preparing to unpack mysql-common_5.8+1.0.7_all.deb ...
Unpacking mysql-common (5.8+1.0.7) over (5.8+1.0.7) ...
Setting up mariadb-client (1:10.5.26-0+deb11u2) ...
Setting up mariadb-server (1:10.5.26-0+deb11u2) ...
Setting up mysql-common (5.8+1.0.7) ...
Setting up mariadb-common (1:10.5.26-0+deb11u2) ...
Processing triggers for mariadb-server-10.5 (1:10.5.26-0+deb11u2) ...
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:/tmp# 
MichaIng commented 1 month ago

Forgot about the config files:

dpkg -i --force-depends,confmiss *.deb
mss1980au commented 1 month ago

this gives an error message:

root@DietPi:~# dpkg -i --force-depends,confmiss .deb dpkg: error: cannot access archive '.deb': No such file or directory root@DietPi:~#

MichaIng commented 1 month ago

In the /tmp dir:

cd /tmp
dpkg -i --force-depends,confmiss *.deb
mss1980au commented 1 month ago

mariadb.service failed again, see output below:

root@DietPi:~# cd /tmp dpkg -i --force-depends,confmiss *.deb (Reading database ... 29121 files and directories currently installed.) Preparing to unpack mariadb-client_1%3a10.5.26-0+deb11u2_all.deb ... Unpacking mariadb-client (1:10.5.26-0+deb11u2) over (1:10.5.26-0+deb11u2) ... Preparing to unpack mariadb-common_1%3a10.5.26-0+deb11u2_all.deb ... Unpacking mariadb-common (1:10.5.26-0+deb11u2) over (1:10.5.26-0+deb11u2) ... Preparing to unpack mariadb-server_1%3a10.5.26-0+deb11u2_all.deb ... Unpacking mariadb-server (1:10.5.26-0+deb11u2) over (1:10.5.26-0+deb11u2) ... Preparing to unpack mysql-common_5.8+1.0.7_all.deb ... Unpacking mysql-common (5.8+1.0.7) over (5.8+1.0.7) ... Setting up mariadb-client (1:10.5.26-0+deb11u2) ... Setting up mariadb-server (1:10.5.26-0+deb11u2) ... Setting up mysql-common (5.8+1.0.7) ... Setting up mariadb-common (1:10.5.26-0+deb11u2) ... Processing triggers for mariadb-server-10.5 (1:10.5.26-0+deb11u2) ... 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:/tmp#

MichaIng commented 1 month ago

Do the files exist now?

ls -l /etc/mysql
mss1980au commented 1 month ago

Yes seems good, see below output:

root@DietPi:/# ls -l /etc/mysql total 20 drwxr-xr-x 2 root root 4096 Oct 4 02:01 conf.d -rw------- 1 root root 544 Oct 3 14:57 debian.cnf -rw-r--r-- 1 root root 1126 Sep 7 23:07 mariadb.cnf drwxr-xr-x 2 root root 4096 Oct 3 14:57 mariadb.conf.d lrwxrwxrwx 1 root root 24 Oct 3 23:30 my.cnf -> /etc/alternatives/my.cnf -rw-r--r-- 1 root root 839 Feb 8 2021 my.cnf.fallback root@DietPi:/#

MichaIng commented 1 month ago

debian-start is still missing. It is part of mariadb-server. Fascinating how the design of dpkg and those maintainer scripts prevent packages form being able to repair themselves 😄.

Try like this:

systemctl mask mariadb
cd /tmp
dpkg -i --force-depends,confmiss *.deb
mss1980au commented 1 month ago

yes, would have thought a package reinstall would have fixed the issue :) Ran the command, but mariadb.service is a disabled, see below output:

root@DietPi:/# systemctl mask mariadb cd /tmp dpkg -i --force-depends,confmiss *.deb Created symlink /etc/systemd/system/mariadb.service → /dev/null. (Reading database ... 29121 files and directories currently installed.) Preparing to unpack mariadb-client_1%3a10.5.26-0+deb11u2_all.deb ... Unpacking mariadb-client (1:10.5.26-0+deb11u2) over (1:10.5.26-0+deb11u2) ... Preparing to unpack mariadb-common_1%3a10.5.26-0+deb11u2_all.deb ... Unpacking mariadb-common (1:10.5.26-0+deb11u2) over (1:10.5.26-0+deb11u2) ... Preparing to unpack mariadb-server_1%3a10.5.26-0+deb11u2_all.deb ... Unpacking mariadb-server (1:10.5.26-0+deb11u2) over (1:10.5.26-0+deb11u2) ... Preparing to unpack mysql-common_5.8+1.0.7_all.deb ... Unpacking mysql-common (5.8+1.0.7) over (5.8+1.0.7) ... Setting up mariadb-client (1:10.5.26-0+deb11u2) ... Setting up mariadb-server (1:10.5.26-0+deb11u2) ... Setting up mysql-common (5.8+1.0.7) ... Setting up mariadb-common (1:10.5.26-0+deb11u2) ... Processing triggers for mariadb-server-10.5 (1:10.5.26-0+deb11u2) ... mariadb.service is a disabled or a static unit, not starting it. root@DietPi:/tmp#

MichaIng commented 1 month ago
ls -l /etc/mysql/debian-start
mss1980au commented 1 month ago

What director should i run that from? says no such directory, see below:

root@DietPi:/# ls -l /etc/mysql/debian-start ls: cannot access '/etc/mysql/debian-start': No such file or directory root@DietPi:/#

MichaIng commented 1 month ago

Is it restored like that?

cat << '_EOF_' > /etc/apt/apt.conf.d/99temp
#clear DPkg::options;
DPkg::options:: "--force-confmiss";
_EOF_
apt install --reinstall mariadb-server
rm /etc/apt/apt.conf.d/99temp
ls -l /etc/mysql/debian-start
mss1980au commented 1 month ago

i ran this command again, but still says '/etc/mysql/debian-start': No such file or directory, see below:

root@DietPi:/# cat << 'EOF' > /etc/apt/apt.conf.d/99temp

clear DPkg::options;

DPkg::options:: "--force-confmiss"; EOF apt install --reinstall mariadb-server rm /etc/apt/apt.conf.d/99temp ls -l /etc/mysql/debian-start Reading package lists... Done Building dependency tree... Done Reading state information... Done 0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded. Need to get 36.0 kB of archives. After this operation, 0 B of additional disk space will be used. Get:1 https://deb.debian.org/debian-security bullseye-security/main arm64 mariadb-server all 1:10.5.26-0+deb11u2 [36.0 kB] Fetched 36.0 kB in 0s (189 kB/s)
debconf: delaying package configuration, since apt-utils is not installed (Reading database ... 29121 files and directories currently installed.) Preparing to unpack .../mariadb-server_1%3a10.5.26-0+deb11u2_all.deb ... Unpacking mariadb-server (1:10.5.26-0+deb11u2) over (1:10.5.26-0+deb11u2) ... Setting up mariadb-server (1:10.5.26-0+deb11u2) ... ls: cannot access '/etc/mysql/debian-start': No such file or directory root@DietPi:/#

MichaIng commented 1 month ago

Different approach:

cd /tmp
dpkg-deb -x mariadb-server_*.deb dir
cp -a dir/etc/* /etc/
systemctl unmask mariadb
systemctl restart mariadb
sleep 5
systemctl status mariadb
MichaIng commented 1 month ago

Ohh wait, you are on Bullseye. It is a different package there 😄:

cat << '_EOF_' > /etc/apt/apt.conf.d/99temp
#clear DPkg::options;
DPkg::options:: "--force-confmiss";
_EOF_
apt install --reinstall mariadb-server-10.5
rm /etc/apt/apt.conf.d/99temp
ls -l /etc/mysql/debian-start
MichaIng commented 1 month ago

Please see my last comment. We reinstalled the wrong package.

mss1980au commented 1 month ago

Yessss.....No error message, seems like a win :) Can I proceed to install NextCould now? Or do we have more steps?

root@DietPi:/# cat << 'EOF' > /etc/apt/apt.conf.d/99temp

clear DPkg::options;

DPkg::options:: "--force-confmiss"; EOF apt install --reinstall mariadb-server-10.5 rm /etc/apt/apt.conf.d/99temp ls -l /etc/mysql/debian-start Reading package lists... Done Building dependency tree... Done Reading state information... Done 0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded. Need to get 4118 kB of archives. After this operation, 0 B of additional disk space will be used. Get:1 https://deb.debian.org/debian-security bullseye-security/main arm64 mariadb-server-10.5 arm64 1:10.5.26-0+deb11u2 [4118 kB] Fetched 4118 kB in 1s (4084 kB/s)
debconf: delaying package configuration, since apt-utils is not installed (Reading database ... 29121 files and directories currently installed.) Preparing to unpack .../mariadb-server-10.5_1%3a10.5.26-0+deb11u2_arm64.deb ... /var/lib/mysql: found previous version 10.5 Unpacking mariadb-server-10.5 (1:10.5.26-0+deb11u2) over (1:10.5.26-0+deb11u2) ... Setting up mariadb-server-10.5 (1:10.5.26-0+deb11u2) ...

Configuration file '/etc/mysql/debian-start', does not exist on system. Installing new config file as you requested.

Configuration file '/etc/mysql/mariadb.conf.d/50-mysqld_safe.cnf', does not exist on system. Installing new config file as you requested.

Configuration file '/etc/mysql/mariadb.conf.d/50-server.cnf', does not exist on system. Installing new config file as you requested. -rwxr-xr-x 1 root root 1731 Sep 7 23:07 /etc/mysql/debian-start root@DietPi:/#

MichaIng commented 1 month ago

Let's see whether this also fixed the service start

systemctl restart mariadb
sleep 5
systemctl status mariadb
mss1980au commented 1 month ago

no error message again, we on a roll, haha

root@DietPi:/# systemctl restart mariadb sleep 5 systemctl status mariadb ● mariadb.service - MariaDB 10.5.26 database server Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled) Drop-In: /etc/systemd/system/mariadb.service.d └─dietpi.conf Active: active (running) since Fri 2024-10-04 03:07:52 BST; 5s ago Docs: man:mariadbd(8) https://mariadb.com/kb/en/library/systemd/ Process: 58761 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS) Process: 58763 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS) Process: 58765 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=/usr/bin/galera_recovery; [ $? -eq 0 ] && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, status=0/SUCCESS) Process: 58830 ExecStartPost=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS) Process: 58832 ExecStartPost=/etc/mysql/debian-start (code=exited, status=0/SUCCESS) Main PID: 58812 (mariadbd) Status: "Taking your SQL requests now..." Tasks: 18 (limit: 29906) CPU: 1.069s CGroup: /system.slice/mariadb.service └─58812 /usr/sbin/mariadbd

Oct 04 03:07:52 DietPi mariadbd[58812]: 2024-10-04 3:07:52 0 [Note] /usr/sbin/mariadbd: ready for connections. Oct 04 03:07:52 DietPi mariadbd[58812]: Version: '10.5.26-MariaDB-0+deb11u2' socket: '/run/mysqld/mysqld.sock' port: 3306 Debian 11 Oct 04 03:07:52 DietPi systemd[1]: Started MariaDB 10.5.26 database server. Oct 04 03:07:52 DietPi /etc/mysql/debian-start[58838]: Looking for 'mariadb' as: /usr/bin/mariadb Oct 04 03:07:52 DietPi /etc/mysql/debian-start[58838]: Looking for 'mariadb-check' as: /usr/bin/mariadb-check Oct 04 03:07:52 DietPi /etc/mysql/debian-start[58838]: This installation of MariaDB is already upgraded to 10.5.26-MariaDB. Oct 04 03:07:52 DietPi /etc/mysql/debian-start[58838]: There is no need to run mysql_upgrade again for 10.5.26-MariaDB. Oct 04 03:07:52 DietPi /etc/mysql/debian-start[58838]: You can use --force if you still want to run mysql_upgrade Oct 04 03:07:52 DietPi /etc/mysql/debian-start[58846]: Checking for insecure root accounts. Oct 04 03:07:52 DietPi /etc/mysql/debian-start[58850]: Triggering myisam-recover for all MyISAM tables and aria-recover for all Aria tables root@DietPi:/#

MichaIng commented 1 month ago

Jep looks good. So it was really only the missing files in /etc/mysql. Next time we better check

dpkg -S /etc/mysql

to assure we reinstall the right packages 😄.

mss1980au commented 1 month ago

Already installed Nextcould, it did it without a hitch and I can now access the Nexcloud home page, do I need to still run "dpkg -S /etc/mysql" ? I didn't run this as I had already started installing Nextcloud.

MichaIng commented 1 month ago

No all good, this is just a command to find out which packages install files into this directory. That way we could have seen that it is mariadb-server-10.5 in your case, not mariadb-server.

Great that everything works again. I'll mark the issue as closed then.

mss1980au commented 1 month ago

Thanks sooo much, love your work Michalng! :)