0

I want to cancel calling a source file on a mysql server which includes an enormous amount of data. It appears to be a sqldump that is broken into many small updates for many tables.

First I tried killing the process,

mysql> show processlist\G
mysql> kill ###;

This appears to only cancel a single query inside the source file; a new process pops up and the server continues to execute the source file.

Then I tried stopping the mysql service,

bash> sudo service mysql stop

But this only paused the problem; the server threw errors constantly until I started the service again, where it picked up where it left off again.

What are my options to fully cancel this query?

0

By "source file", do you mean the source command in the commandline tool mysql? If so, you need to kill that client, not the individual commands in PROCESSLIST.

Go to the OS's task manager. (You may need to be root.)

# ps -axl | grep mysql  (or other args of your picking)
# kill -9 1234567       (using the PID from the ps)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.