Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否可以一次杀死所有 mySQL 进程,除了一个进程 ID?
您可以使用 information_schema 表,它有点麻烦,但它的工作原理;)
mysql> select concat('KILL ',id,';') from information_schema.processlist where id != '1234' into outfile '/tmp/foo.txt'; mysql> source /tmp/foo.txt;