MariaDB - I cannot stop the service  [Solved]

Help for Current Versions of MX
When asking for help, use Quick System Info from MX Tools. It will be properly formatted using the following steps.
1. Click on Quick System Info in MX Tools
2. Right click in your post and paste.
Message
Author
User avatar
wellsey
Posts: 47
Joined: Sun Jun 03, 2018 3:56 pm

MariaDB - I cannot stop the service

#1 Post by wellsey »

On my recent clean install of mx23.4 I installed the local server (lamp) under the Server option of MXPI's popular packages tab. However I dont seem to be able to stop it and restart it.

Code: Select all

$ ps aux |grep mariadb
mysql       2641  0.0  2.9 1275268 230620 ?      Sl   16:05   0:00 /usr/sbin/mariadbd --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/mysql/plugin --user=mysql --skip-log-error --pid-file=/run/mysqld/mysqld.pid --socket=/run/mysqld/mysqld.sock
steve       4917  0.0  0.0  75660  2188 pts/2    S+   16:08   0:00 grep mariadb

Code: Select all

$ sudo service mariadb stop
[sudo] password for steve:         
Stopping MariaDB database server: mariadbd failed!

$ sudo  /etc/init.d/mariadb stop
Stopping MariaDB database server: mariadbd failed!

Code: Select all

$ sudo ls -hal /var/run/mysqld/
total 4.0K
drwxr-xr-x  2 mysql root    80 Nov  8 16:05 .
drwxr-xr-x 34 root  root  1.2K Nov  8 16:08 ..
-rw-rw----  1 mysql mysql    5 Nov  8 16:05 mysqld.pid
srwxrwxrwx  1 mysql mysql    0 Nov  8 16:05 mysqld.sock
There does not appear to be any Mysql/MariaDB log file in /var/log/

I have tried pkill but on looking it is still running

Code: Select all

$ sudo pkill  -9 2641
steve@mx-laptop:~
$ ps aux |grep mariadb
mysql       2641  0.0  3.0 1275268 239032 ?      Sl   16:05   0:00 /usr/sbin/mariadbd --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/mysql/plugin --user=mysql --skip-log-error --pid-file=/run/mysqld/mysqld.pid --socket=/run/mysqld/mysqld.sock
steve       6840  0.0  0.0  75660  2304 pts/2    S+   16:34   0:00 grep mariadb
Any ideas ? Is something restarting it?


Code: Select all

Snapshot created on: 20241029_1714
System:
  Kernel: 6.1.0-26-amd64 [6.1.112-1] arch: x86_64 bits: 64 compiler: gcc v: 12.2.0
    parameters: BOOT_IMAGE=/boot/vmlinuz-6.1.0-26-amd64 root=UUID=<filter> ro quiet splash
  Desktop: Xfce v: 4.18.1 tk: Gtk v: 3.24.36 info: xfce4-panel wm: xfwm v: 4.18.0 vt: 7
    dm: LightDM v: 1.26.0 Distro: MX-23.4_x64 Libretto September 15  2024 base: Debian GNU/Linux 12
    (bookworm)
Machine:
  Type: Laptop System: Dell product: Latitude E4310 v: 0001 serial: <superuser required> Chassis:
    type: 9 serial: <superuser required>
  Mobo: Dell model: 0D8H24 v: A00 serial: <superuser required> BIOS: Dell v: A06 date: 02/15/2011
Battery:
  ID-1: BAT0 charge: 15.4 Wh (57.5%) condition: 26.8/48.8 Wh (55.0%) volts: 12.0 min: 11.1
    model: SMP DELL 9H41496 type: Li-ion serial: <filter> status: charging
CPU:
  Info: model: Intel Core i5 M 560 bits: 64 type: MT MCP arch: Westmere gen: core 1 level: v2
    built: 2010-11 process: Intel 32nm family: 6 model-id: 0x25 (37) stepping: 5 microcode: 0x7
  Topology: cpus: 1x cores: 2 tpc: 2 threads: 4 smt: enabled cache: L1: 128 KiB
    desc: d-2x32 KiB; i-2x32 KiB L2: 512 KiB desc: 2x256 KiB L3: 3 MiB desc: 1x3 MiB
  Speed (MHz): avg: 1246 high: 1307 min/max: 1199/2667 boost: enabled scaling:
    driver: acpi-cpufreq governor: ondemand cores: 1: 1307 2: 1198 3: 1261 4: 1221 bogomips: 21280
  Flags: ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities:
  Type: gather_data_sampling status: Not affected
  Type: itlb_multihit status: KVM: VMX disabled
  Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT vulnerable
  Type: mds status: Vulnerable: Clear CPU buffers attempted, no microcode; SMT vulnerable
  Type: meltdown mitigation: PTI
  Type: mmio_stale_data status: Unknown: No mitigations
  Type: reg_file_data_sampling status: Not affected
  Type: retbleed status: Not affected
  Type: spec_rstack_overflow status: Not affected
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: Retpolines; IBPB: conditional; IBRS_FW; STIBP: conditional; RSB
    filling; PBRSB-eIBRS: Not affected; BHI: Not affected
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel Core Processor Integrated Graphics vendor: Dell driver: i915 v: kernel
    arch: Gen-5.75 process: Intel 45nm built: 2010 ports: active: HDMI-A-1,eDP-1 empty: DP-1, DP-2,
    HDMI-A-2, VGA-1 bus-ID: 00:02.0 chip-ID: 8086:0046 class-ID: 0300
  Device-2: Primax Dell Laptop Integrated Webcam 2Mpix type: USB driver: uvcvideo bus-ID: 1-1.4:5
    chip-ID: 0461:4db1 class-ID: 0e02
  Display: x11 server: X.Org v: 1.21.1.7 compositor: xfwm v: 4.18.0 driver: X: loaded: intel
    dri: crocus gpu: i915 display-ID: :0.0 screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.00x11.22") s-diag: 582mm (22.93")
  Monitor-1: HDMI-A-1 mapped: HDMI1 model: Samsung T24D390 built: 2013 res: 1920x1080 hz: 60
    dpi: 94 gamma: 1.2 size: 520x290mm (20.47x11.42") diag: 598mm (23.5") ratio: 16:9 modes:
    max: 1920x1080 min: 720x400
  Monitor-2: eDP-1 mapped: eDP1 pos: primary model: LG Display 0x024d built: 2010 res: 1913x1076
    hz: 60 dpi: 168 gamma: 1.2 size: 290x170mm (11.42x6.69") diag: 338mm (13.3") ratio: 16:9
    modes: 1366x768
  API: OpenGL v: 2.1 Mesa 22.3.6 renderer: Mesa Intel HD Graphics (ILK) direct-render: Yes
Audio:
  Device-1: Intel 5 Series/3400 Series High Definition Audio vendor: Dell 5 driver: snd_hda_intel
    v: kernel bus-ID: 00:1b.0 chip-ID: 8086:3b57 class-ID: 0403
  API: ALSA v: k6.1.0-26-amd64 status: kernel-api tools: alsamixer,amixer
  Server-1: PipeWire v: 1.0.0 status: active with: 1: pipewire-pulse status: active
    2: wireplumber status: active 3: pipewire-alsa type: plugin 4: pw-jack type: plugin
    tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: Intel 82577LM Gigabit Network vendor: Dell driver: e1000e v: kernel port: 6040
    bus-ID: 00:19.0 chip-ID: 8086:10ea class-ID: 0200
  IF: eth0 state: up speed: 1000 Mbps duplex: full mac: <filter>
  Device-2: Intel Centrino Advanced-N 6200 driver: iwlwifi v: kernel modules: wl pcie: gen: 1
    speed: 2.5 GT/s lanes: 1 bus-ID: 02:00.0 chip-ID: 8086:422c class-ID: 0280
  IF: wlan0 state: down mac: <filter>
Bluetooth:
  Device-1: Dell DW375 Bluetooth Module type: USB driver: btusb v: 0.8 bus-ID: 2-1.7:3
    chip-ID: 413c:8187 class-ID: fe01 serial: <filter>
  Report: hciconfig ID: hci0 rfk-id: 3 state: up address: <filter> bt-v: 2.0 lmp-v: 3.0
    sub-v: 4203 hci-v: 3.0 rev: 205
  Info: acl-mtu: 1021:8 sco-mtu: 64:1 link-policy: rswitch hold sniff park
    link-mode: peripheral accept service-classes: rendering, capturing, object transfer, audio,
    telephony
RAID:
  Hardware-1: Intel 82801 Mobile SATA Controller [RAID mode] driver: ahci v: 3.0 port: 6020
    bus-ID: 00:1f.2 chip-ID: 8086:282a rev: N/A class-ID: 0104
Drives:
  Local Storage: total: 223.57 GiB used: 40.61 GiB (18.2%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/sda maj-min: 8:0 vendor: SanDisk model: SDSSDA240G size: 223.57 GiB block-size:
    physical: 512 B logical: 512 B speed: 3.0 Gb/s type: SSD serial: <filter> rev: 70RL scheme: MBR
Partition:
  ID-1: / raw-size: 176.7 GiB size: 172.86 GiB (97.83%) used: 40.61 GiB (23.5%) fs: ext4
    dev: /dev/sda2 maj-min: 8:2
Swap:
  Kernel: swappiness: 15 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: partition size: 8.79 GiB used: 0 KiB (0.0%) priority: -2 dev: /dev/sda1
    maj-min: 8:1
Sensors:
  System Temperatures: cpu: 55.0 C mobo: N/A sodimm: SODIMM C
  Fan Speeds (RPM): cpu: 3081
Repos:
  Packages: pm: dpkg pkgs: 2155 libs: 1060 tools: apt,apt-get,aptitude,nala,synaptic pm: rpm
    pkgs: 0 pm: flatpak pkgs: 0
  No active apt repos in: /etc/apt/sources.list
  Active apt repos in: /etc/apt/sources.list.d/brave-browser-release.list
    1: deb [arch=amd64 signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg] https://brave-browser-apt-release.s3.brave.com/ stable main
  Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list
    1: deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware
  Active apt repos in: /etc/apt/sources.list.d/debian.list
    1: deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
    2: deb http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
  Active apt repos in: /etc/apt/sources.list.d/microsoft-edge.list
    1: deb [arch=amd64] https://packages.microsoft.com/repos/edge/ stable main
  Active apt repos in: /etc/apt/sources.list.d/mx.list
    1: deb http://mxlinux.mirrors.uk2.net/packages/mx/repo/ bookworm main non-free
  Active apt repos in: /etc/apt/sources.list.d/vscode.list
    1: deb [arch=amd64,arm64,armhf] https://packages.microsoft.com/repos/code stable main
Info:
  Processes: 234 Uptime: 27m wakeups: 2 Memory: 7.56 GiB used: 2.28 GiB (30.2%) Init: SysVinit
  v: 3.06 runlevel: 5 default: graphical tool: systemctl Compilers: gcc: 12.2.0 alt: 12
  Client: shell wrapper v: 5.2.15-release inxi: 3.3.26
Boot Mode: BIOS (legacy, CSM, MBR)
"There's no limit to what he can do. He could destroy the Earth... If anything should happen to me you must go to Gort, you must say these words, 'Klaatu barada nikto', please repeat that."

Dell Latitude E4310 I5 8GB 256GB SSD

User avatar
CharlesV
Global Moderator
Posts: 7078
Joined: Sun Jul 07, 2019 5:11 pm

Re: MariaDB - I cannot stop the service

#2 Post by CharlesV »

Try using the mysql instead.

Code: Select all

sudo service mysql stop

*QSI = Quick System Info from menu (Copy for Forum)
*MXPI = MX Package Installer
*Please check the solved checkbox on the post that solved it.
*Linux -This is the way!

User avatar
wellsey
Posts: 47
Joined: Sun Jun 03, 2018 3:56 pm

Re: MariaDB - I cannot stop the service

#3 Post by wellsey »

CharlesV wrote: Fri Nov 08, 2024 12:00 pm Try using the mysql instead.

Code: Select all

sudo service mysql stop

I forgot to mention i have tried that

Code: Select all

$ sudo service mysql stop
[sudo] password for steve:         
mysql: unrecognized service
"There's no limit to what he can do. He could destroy the Earth... If anything should happen to me you must go to Gort, you must say these words, 'Klaatu barada nikto', please repeat that."

Dell Latitude E4310 I5 8GB 256GB SSD

User avatar
CharlesV
Global Moderator
Posts: 7078
Joined: Sun Jul 07, 2019 5:11 pm

Re: MariaDB - I cannot stop the service

#4 Post by CharlesV »

hmm.. try mongod

sudo service mongod status
*QSI = Quick System Info from menu (Copy for Forum)
*MXPI = MX Package Installer
*Please check the solved checkbox on the post that solved it.
*Linux -This is the way!

User avatar
wellsey
Posts: 47
Joined: Sun Jun 03, 2018 3:56 pm

Re: MariaDB - I cannot stop the service

#5 Post by wellsey »

Again "unrecognised service"
"There's no limit to what he can do. He could destroy the Earth... If anything should happen to me you must go to Gort, you must say these words, 'Klaatu barada nikto', please repeat that."

Dell Latitude E4310 I5 8GB 256GB SSD

User avatar
dolphin_oracle
Developer
Posts: 22047
Joined: Sun Dec 16, 2007 12:17 pm

Re: MariaDB - I cannot stop the service

#6 Post by dolphin_oracle »

I believe the commands in the original post are the correct service names, but they do not work, for whatever reason. maybe something else needs closed down first? I really don't know much about the LAMP stack.
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.

User avatar
wellsey
Posts: 47
Joined: Sun Jun 03, 2018 3:56 pm

Re: MariaDB - I cannot stop the service

#7 Post by wellsey »

dolphin_oracle wrote: Sat Nov 09, 2024 10:09 am I believe the commands in the original post are the correct service names, but they do not work, for whatever reason. maybe something else needs closed down first? I really don't know much about the LAMP stack.
Yes they are correct, I think this was what was really being suggested

Code: Select all

$ sudo service mariadb status
[sudo] password for steve:         
/usr/bin/mariadb-admin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'
and Chatgpt tells me that the 'status' option accesses the database not just the service - and there are ways to configure that but I dont see a reason to I can see the process running. Chatgpt suggested pkilling then removing the .pid file - I did that to no avail
"There's no limit to what he can do. He could destroy the Earth... If anything should happen to me you must go to Gort, you must say these words, 'Klaatu barada nikto', please repeat that."

Dell Latitude E4310 I5 8GB 256GB SSD

User avatar
CharlesV
Global Moderator
Posts: 7078
Joined: Sun Jul 07, 2019 5:11 pm

Re: MariaDB - I cannot stop the service

#8 Post by CharlesV »

What version of mariadb is loaded?

Have you tried directly shutting it down with the mariadb-admin command?
https://mariadb.com/kb/en/mariadb-admin/
https://mariadb.com/kb/en/shutdown/

In my installs I have to use mongod or mysql to shut the service down, and have only ever used those.
*QSI = Quick System Info from menu (Copy for Forum)
*MXPI = MX Package Installer
*Please check the solved checkbox on the post that solved it.
*Linux -This is the way!

User avatar
aika
Posts: 219
Joined: Wed May 15, 2024 12:17 am

Re: MariaDB - I cannot stop the service

#9 Post by aika »

wellsey wrote: Fri Nov 08, 2024 11:47 am...

Code: Select all

$ sudo service mariadb stop
[sudo] password for steve:         
Stopping MariaDB database server: mariadbd failed!
...
Was MariaDB started correctly under SysVinit? I would start the MX system as SystemD and test whether MariaDB then behaves correctly:

Code: Select all

sudo systemctl stop mariadb
MariaDB with SysVinit => https://mariadb.com/kb/en/sysvinit/#int ... er-process
MariaDB with SystemD => https://mariadb.com/kb/en/systemd/#inte ... er-process

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

Re: MariaDB - I cannot stop the service

#10 Post by timkb4cq »

Have you tried using kill instead of pkill? pkill sends a message to the process. kill -9 just terminates it.
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

Post Reply

Return to “MX Help”