Little note/article for everyone who should/need work with mysql using command line interface to perform usuall task. With this "reminder" you will be able to admin/backup/restore anything like a real chief.

If you want to kill, in one line all the process launched by one user you can use

pkill -u <user>

 more usage info below

Usage:
 pkill [options] <pattern>

Options:
 -<sig>, --signal <sig>    signal to send (either number or name)
 -e, --echo                display what is killed
 -f, --full                use full process name to match
 -g, --pgroup <id,...>     match listed process group IDs
 -G, --group <gid,...>     match real group IDs
 -n, --newest              select most recently started
 -o, --oldest              select least recently started
 -P, --parent <ppid,...>   match only childs of given parent
 -s, --session <sid,...>   match session IDs
 -t, --terminal <tty,...>  match by controlling terminal
 -u, --euid <id,...>       match by effective IDs
 -U, --uid <id,...>        match by real IDs
 -x, --exact               match exectly with command name
 -F, --pidfile <file>      read PIDs from file
 -L, --logpidfile          fail if PID file is not locked

 -h, --help     display this help and exit
 -V, --version  output version information and exit

 

Search & Share