MySQL Query was killed, but caused thesql database to not accept new reads or writes

MySQL

This has happened a few times before and on all of those times I was not able to find an answer on the internet and I've had to completely uninstall MySQL and reimport the database from a backup. Although right now there's a little more than 1 billion rows so that's not something I see as an acceptable solution at this time.

In the processlist there are four queries showing as "sending data" and all of them are killed. Below that there are about 100 more listed as "statistics" which cannot be killed either.

Is there a way I could fix this without reinstalling MySQL?

Edit: Ubuntu 16, mysql newest

Best Answer

For future refference for myself and anyone else with this issue, run "pkill mysql", move "ibtmp1" (like 90G) inside of /var/lib/mysql to another location, then start mysql again.