Unable to update mariadb server  [Solved]

Message
Author
User avatar
peregrine
Administrator
Posts: 838
Joined: Wed Jul 12, 2006 7:39 am

Unable to update mariadb server

#1 Post by peregrine »

I have the local web server from the package manager installed. I have used it for years. Updates with maria database always fail if I do not stop mariadb before doing the update.
A few months ago - the last time I needed to do this - /etc/init.d/mysqld stop would stop it.
Now I get bash: /etc/init.d/mysqld: No such file or directory
https://mariadb.com/kb/en/sysvinit/#int ... er-process tells me to use service mysql stop
With that I get mysql: unrecognized service
I also tried - service mariadb stop
That appears to be what I should use now, but it failed -
Stopping MariaDB database server: mariadbd failed!

I used what Tim suggested in https://forum.mxlinux.org/viewtopic.php ... er#p648323 to stop mariadb. Then went to fix the broken package. I get
E: /var/cache/apt/archives/mariadb-server-10.5_1%3a10.5.18-0+deb11u1_amd64.deb: new mariadb-server-10.5 package pre-removal script subprocess returned error exit status 1

Until this is resolved, I can go to Synaptic to check for and make other updates, but the notify icon shows that there are no updates needed.
Asus A78M - AMD A10-6800K - 8GB Ram - 120GB SSD - Samsung SyncMaster 2243SWX LCD MX18 ------ Lenovo Yoga intel i7 7500 / MX-21

User avatar
timkb4cq
Developer
Posts: 3560
Joined: Wed Jul 12, 2006 4:05 pm

Re: Unable to update mariadb server  [Solved]

#2 Post by timkb4cq »

Here's the pre-removal script that's failing:

Code: Select all

#!/bin/sh
set -e

# Modified dh_systemd_start snippet that's not added automatically
if [ -d /run/systemd/system ]; then
	deb-systemd-invoke stop mariadb.service >/dev/null
# Modified dh_installinit snippet to only run with sysvinit
elif [ -x "/etc/init.d/mariadb" ]; then
	invoke-rc.d mariadb stop || exit $?
fi
So if you boot with systemd it will use the systemd commands to safely stop mariadb. If booted with sysvinit it will look for /etc/init.d/mariadb and use that init.d script to stop it.
Since it's failing, and you're booting with sysvinit, that /etc/init.d/mariadb script may be missing or corrupt. causing the prerm script to fail.

I would try booting with systemd then using

Code: Select all

sudo dpkg --configure -a
to get the mariadb update configured. I just checked the deb and the /etc/init.d/mariadb script is still included in the update so that script should be installed. Make sure to accept changes to that script if prompted.
HP Pavillion TP01, AMD Ryzen 3 5300G (quad core), Crucial 500GB SSD, Toshiba 6TB 7200rpm
Dell Inspiron 15, AMD Ryzen 7 2700u (quad core). Sabrent 500GB nvme, Seagate 1TB

User avatar
peregrine
Administrator
Posts: 838
Joined: Wed Jul 12, 2006 7:39 am

Re: Unable to update mariadb server

#3 Post by peregrine »

@timkb4cq Thank you. I booted into system D and got the update done, then rebooted into init.
Asus A78M - AMD A10-6800K - 8GB Ram - 120GB SSD - Samsung SyncMaster 2243SWX LCD MX18 ------ Lenovo Yoga intel i7 7500 / MX-21

harley-peter
Posts: 131
Joined: Tue Jan 05, 2021 6:13 am

Re: Unable to update mariadb server

#4 Post by harley-peter »

I have the same problem and cannot update my system but I don't know how to boot into system D and solve the problem. Can you help me please with a more detailed info. Thank's

Code: Select all

System:    Kernel: 5.10.0-20-amd64 [5.10.158-2] x86_64 bits: 64 compiler: gcc v: 10.2.1 
           parameters: BOOT_IMAGE=/boot/vmlinuz-5.10.0-20-amd64 
           root=UUID=<filter> ro quiet splash 
           Desktop: Xfce 4.16.0 tk: Gtk 3.24.24 info: xfce4-panel wm: xfwm 4.16.1 vt: 7 
           dm: LightDM 1.26.0 Distro: MX-21.2.1_x64 Wildflower November 11  2020 
           base: Debian GNU/Linux 11 (bullseye) 
Machine:   Type: Laptop System: LENOVO product: 20FMS7800T v: ThinkPad T460 serial: <filter> 
           Chassis: type: 10 serial: <filter> 
           Mobo: LENOVO model: 20FMS7800T v: SDK0J40697 WIN serial: <filter> UEFI: LENOVO 
           v: R06ET47W (1.21 ) date: 11/30/2016 
Battery:   ID-1: BAT0 charge: 16.9 Wh (93.9%) condition: 18.0/23.5 Wh (76.7%) volts: 12.4 
           min: 11.4 model: LGC 45N1113 type: Li-ion serial: <filter> status: Not charging 
           ID-2: BAT1 charge: 11.4 Wh (17.7%) condition: 64.5/71.3 Wh (90.5%) volts: 10.3 
           min: 10.8 model: SANYO 45N1777 type: Li-ion serial: <filter> status: Discharging 
CPU:       Info: Dual Core model: Intel Core i5-6300U bits: 64 type: MT MCP arch: Skylake 
           family: 6 model-id: 4E (78) stepping: 3 microcode: F0 cache: L2: 3 MiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 19999 
           Speed: 800 MHz min/max: 400/3000 MHz Core speeds (MHz): 1: 800 2: 800 3: 800 4: 800 
           Vulnerabilities: Type: itlb_multihit status: KVM: VMX disabled 
           Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT vulnerable 
           Type: mds mitigation: Clear CPU buffers; SMT vulnerable 
           Type: meltdown mitigation: PTI 
           Type: mmio_stale_data mitigation: Clear CPU buffers; SMT vulnerable 
           Type: retbleed mitigation: IBRS 
           Type: spec_store_bypass 
           mitigation: Speculative Store Bypass disabled via prctl and seccomp 
           Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization 
           Type: spectre_v2 
           mitigation: IBRS, IBPB: conditional, RSB filling, PBRSB-eIBRS: Not affected 
           Type: srbds mitigation: Microcode 
           Type: tsx_async_abort mitigation: Clear CPU buffers; SMT vulnerable 
Graphics:  Device-1: Intel Skylake GT2 [HD Graphics 520] vendor: Lenovo driver: i915 v: kernel 
           bus-ID: 00:02.0 chip-ID: 8086:1916 class-ID: 0300 
           Device-2: Acer ThinkPad P50 Integrated Camera type: USB driver: uvcvideo bus-ID: 1-10:6 
           chip-ID: 5986:0706 class-ID: 0e02 
           Display: x11 server: X.Org 1.20.11 compositor: xfwm4 v: 4.16.1 driver: 
           loaded: modesetting unloaded: fbdev,vesa display-ID: :0.0 screens: 1 
           Screen-1: 0 s-res: 1600x900 s-dpi: 96 s-size: 423x238mm (16.7x9.4") 
           s-diag: 485mm (19.1") 
           Monitor-1: eDP-1 res: 1600x900 hz: 60 dpi: 132 size: 309x173mm (12.2x6.8") 
           diag: 354mm (13.9") 
           OpenGL: renderer: Mesa Intel HD Graphics 520 (SKL GT2) v: 4.6 Mesa 20.3.5 
           direct render: Yes 
Audio:     Device-1: Intel Sunrise Point-LP HD Audio vendor: Lenovo driver: snd_hda_intel 
           v: kernel alternate: snd_soc_skl bus-ID: 00:1f.3 chip-ID: 8086:9d70 class-ID: 0403 
           Sound Server-1: ALSA v: k5.10.0-20-amd64 running: yes 
           Sound Server-2: PulseAudio v: 14.2 running: yes 
Network:   Device-1: Intel Ethernet I219-LM vendor: Lenovo driver: e1000e v: kernel port: efa0 
           bus-ID: 00:1f.6 chip-ID: 8086:156f class-ID: 0200 
           IF: eth0 state: down mac: <filter> 
           Device-2: Intel Wireless 8260 driver: iwlwifi v: kernel modules: wl port: efa0 
           bus-ID: 04:00.0 chip-ID: 8086:24f3 class-ID: 0280 
           IF: wlan0 state: up mac: <filter> 
Bluetooth: Device-1: Intel Bluetooth wireless interface type: USB driver: btusb v: 0.8 
           bus-ID: 1-7:4 chip-ID: 8087:0a2b class-ID: e001 
           Report: hciconfig ID: hci0 rfk-id: 2 state: up address: <filter> bt-v: 2.1 lmp-v: 4.2 
           sub-v: 100 hci-v: 4.2 rev: 100 
           Info: acl-mtu: 1021:4 sco-mtu: 96:6 link-policy: rswitch sniff link-mode: slave accept 
           service-classes: rendering, capturing, audio 
Drives:    Local Storage: total: 238.47 GiB used: 79.07 GiB (33.2%) 
           SMART Message: Unable to run smartctl. Root privileges required. 
           ID-1: /dev/sda maj-min: 8:0 vendor: Samsung model: MZ7TY256HDHP-000L7 size: 238.47 GiB 
           block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s type: SSD serial: <filter> 
           rev: 5L6Q scheme: GPT 
Partition: ID-1: / raw-size: 19.53 GiB size: 19.06 GiB (97.57%) used: 15.52 GiB (81.5%) fs: ext4 
           dev: /dev/sda2 maj-min: 8:2 
           ID-2: /boot/efi raw-size: 100 MiB size: 96 MiB (96.00%) used: 25.2 MiB (26.3%) fs: vfat 
           dev: /dev/sda1 maj-min: 8:1 
           ID-3: /home raw-size: 218.84 GiB size: 214.35 GiB (97.95%) used: 63.52 GiB (29.6%) 
           fs: ext4 dev: /dev/sda3 maj-min: 8:3 
Swap:      Alert: No swap data was found. 
Sensors:   System Temperatures: cpu: 40.0 C mobo: N/A 
           Fan Speeds (RPM): cpu: 0 
Repos:     Packages: note: see --pkg apt: 2422 lib: 1181 flatpak: 0 
           No active apt repos in: /etc/apt/sources.list 
           Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list 
           1: deb http://deb.debian.org/debian/ bullseye-updates main contrib non-free
           Active apt repos in: /etc/apt/sources.list.d/debian.list 
           1: deb http://deb.debian.org/debian/ bullseye main contrib non-free
           2: deb http://security.debian.org/debian-security bullseye-security main contrib non-free
           Active apt repos in: /etc/apt/sources.list.d/mx.list 
           1: deb http://ftp.halifax.rwth-aachen.de/mxlinux/packages/mx/repo/ bullseye main non-free
           Active apt repos in: /etc/apt/sources.list.d/various.list 
           1: deb [arch=amd64] https://wire-app.wire.com/linux/debian/ stable main
           2: deb https://apt.enpass.io/ stable main
           3: deb [arch=amd64] http://deb.librewolf.net focal main
           Active apt repos in: /etc/apt/sources.list.d/vivaldi.list 
           1: deb [arch=amd64] http://repo.vivaldi.com/stable/deb/ stable main
Info:      Processes: 253 Uptime: 3h 20m wakeups: 2 Memory: 15.5 GiB used: 3.74 GiB (24.1%) 
           Init: SysVinit v: 2.96 runlevel: 5 default: 5 tool: systemctl Compilers: gcc: 10.2.1 
           alt: 10 Client: shell wrapper v: 5.1.4-release inxi: 3.3.06 
Boot Mode: UEFI

Post Reply

Return to “Software / Configuration”