If information_schema.processlist doesn’t exist on your version of MySQL, this works in a linux script:

#!/bin/bash
for each in mysqladmin -u root -prootpwd processlist | awk '{print $2, $4, $8}' | grep $dbname | grep $dbuser | awk '{print $1}';
do mysqladmin -u root -prootpwd kill $each;
done

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-09-16
  • 2021-08-14
  • 2021-12-10
  • 2021-08-02
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-06-16
  • 2021-10-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-01
  • 2022-12-23
相关资源
相似解决方案