Page 2 of 2
Re: MariaDB - I cannot stop the service
Posted: Sun Nov 10, 2024 11:12 am
by wellsey
timkb4cq wrote: Sat Nov 09, 2024 3:55 pm
Have you tried using kill instead of pkill? pkill sends a message to the process. kill -9 just terminates it.
Thanks for that, tried it 'kill' does live up to its name, 'pkill' did not
Re: MariaDB - I cannot stop the service
Posted: Sun Nov 10, 2024 11:24 am
by wellsey
Good idea to try SystemD -
and it works correctly in SystemD ie the systemctl command will start/stop/restart ( even status command produces information but not complete info as a DB password is not given )
So maybe the conclusion is the install from MXPI under SysVinit was not properly done?
Re: MariaDB - I cannot stop the service [Solved]
Posted: Sun Nov 10, 2024 11:59 am
by wellsey
I used
Popular packages under the
Server tab of MXPI and it iinstalled mariadb 10.11
Thank YOU , Your suggestion of
WORKED and because the command allows the use of a password
Code: Select all
sudo mariadb-admin -pmypassword status
Uptime: 867 Threads: 1 Questions: 2 Slow queries: 0 Opens: 17 Open tables: 10 Queries per second avg: 0.002
also worked
( command mysqladmin worked just the same BTW)
I can understand the need for a special command to cope with the controlled shutting down of replication to slaves, but in my situation of not using replication I would have thought that a simple stop of the service should work in SysVinit just as it did under SystemD
Any way this seems to have solved it I will mark it so - Thanks to all who posted
Re: MariaDB - I cannot stop the service
Posted: Sun Nov 10, 2024 12:05 pm
by CharlesV
Excellent! Glad you have it resolved.
Re: MariaDB - I cannot stop the service
Posted: Sun Nov 10, 2024 12:22 pm
by fehlix
wellsey wrote: Sun Nov 10, 2024 11:24 am
So maybe the conclusion is the install from MXPI under SysVinit was not properly done?
Not sure, installed with running sysvinit, and testing start,stop status:
Status:
Code: Select all
sudo service mariadb status
/usr/bin/mariadb-admin Ver 9.1 Distrib 10.11.6-MariaDB, for debian-linux-gnu on x86_64
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Server version 10.11.6-MariaDB-0+deb12u1
Protocol version 10
Connection Localhost via UNIX socket
UNIX socket /run/mysqld/mysqld.sock
Uptime: 11 sec
Threads: 1 Questions: 61 Slow queries: 0 Opens: 33 Open tables: 26 Queries per second avg: 5.545.
Stop:
Code: Select all
sudo service mariadb stop
Stopping MariaDB database server: mariadbd.
Status:
Code: Select all
sudo service mariadb status
MariaDB is stopped..
Start:
Code: Select all
sudo service mariadb start
Starting MariaDB database server: mariadbd.
Status again:
Code: Select all
sudo service mariadb status
/usr/bin/mariadb-admin Ver 9.1 Distrib 10.11.6-MariaDB, for debian-linux-gnu on x86_64
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Server version 10.11.6-MariaDB-0+deb12u1
Protocol version 10
Connection Localhost via UNIX socket
UNIX socket /run/mysqld/mysqld.sock
Uptime: 7 sec
Threads: 1 Questions: 61 Slow queries: 0 Opens: 33 Open tables: 26 Queries per second avg: 8.714.
Works all as it should be.
Re: MariaDB - I cannot stop the service
Posted: Sun Nov 10, 2024 12:30 pm
by CharlesV
From what I read in the mariadb KB, some applications using the DB will lock a table or record and then the ONLY method of shutting the DB down is with either the kill command or that admin shutdown.
I have not seen any of these in my installs, but I am primarily using Unifi Controllers or very simple DB apps.
Re: MariaDB - I cannot stop the service
Posted: Sun Nov 10, 2024 1:09 pm
by fehlix
CharlesV wrote: Sun Nov 10, 2024 12:30 pm
From what I read in the mariadb KB, some applications using the DB will lock a table or record and then the ONLY method of shutting the DB down is with either the kill command or that admin shutdown.
I have not seen any of these in my installs, but I am primarily using Unifi Controllers or very simple DB apps.
Yes, that's correct, and that's init-script and systemd service to stop are doing:
is doing
look here into the init scrpt:
Code: Select all
grep shutdown /etc/init.d/mariadb
shutdown_out=`$MYADMIN shutdown 2>&1`; r=$?
[ "$VERBOSE" != "no" ] && log_failure_msg "Error: $shutdown_out"
Re: MariaDB - I cannot stop the service
Posted: Sun Nov 10, 2024 1:27 pm
by CharlesV
it would seem so.. but it appears something is a little different between the two.