mysql_zap
mysql_zap was removed from MariaDB. pkill can be used as an alternative.
mysql_zap kills processes that match a pattern. It uses the ps command and Unix signals, so it runs on Unix and Unix-like systems.
Invoke mysql_zap like this:
A process matches if its output line from the ps command contains the pattern. By default, mysql_zap asks for confirmation for each process. Respond y to kill the process, or q to exit mysql_zap. For any other response, mysql_zap does not attempt to kill the process.
If the -signal option is given, it specifies the name or number of the signal to send to each process. Otherwise, mysql_zap tries first with TERM (signal 15) and then with KILL (signal 9).
mysql_zap supports the following additional options:
Option
Description
--help, -?, -I
Display a help message and exit.
-f
Force mode. mysql_zap attempts to kill each process without confirmation.
-t
Test mode. Display information about each process but do not kill it.
Example
pkill as an Alternative
pkill can be used as an alternative to mysql_zap, although an important distinction between pkill and mysql_zap is that mysql_zap kills the server 'gently' first (with signal 15) and only if the server doesn't die in a limited time then tries -9.
To use pkill in the same way, one must run it twice; pkill --signal 15 mysqld ; sleep(10) ; pkill -f --signal 9 pattern
This page is licensed: CC BY-SA / Gnu FDL
Last updated
Was this helpful?