ctrl + c will generate a SIGINT , which can be captured or blocked by the application. If you just start killall mysqld from another terminal, you will send SIGTERM to a process that may also be caught or blocked, but will give a much stronger hint that the process should stop immediately. (Which would be good for cleanly closing database tables.)
ctrl + \ will generate a SIGQUIT , which can be captured or blocked by the application. (If the application does not block this signal, the OS will generate a main file for you.)
You can send SIGKILL manually using kill(1) ; SIGKILL cannot be caught or blocked and thus will always stop the process if the kernel is sufficient to process the signal. Find pid using pidof or some other mechanism and run kill -SIGKILL pid . Note that this is a gross death; the process is not given the opportunity to clean up after itself, so the database tables may remain in an inconsistent state, which may take some time to be restored at the next start.
If you just need to go back, you can use ctrl + z to pause the process. You can then use the shell commands bg and fg to let the process continue to run in the background or re-join the process in the foreground. (This terminology does not make sense, but I hope that it conveys this idea.)
source share