I want to delete all records from wp_usermeta with user_id whose meta_value is “tonetone” which is spam accounts.
As you know already, there are many records with one user_id in wp_usermeta. I tried like this but doesn’t work. Thanks to anyone who can show me the way.
All I want to do is delete all records
with that user_id but the common value
all I can get is “tonetone”
DELETE FROM wp_usermeta WHERE user_id = (SELECT user_id FROM wp_usermeta WHERE meta_value = "tonetone")

If you want to delete users where any of the records for that user has tonetone as a meta_value, you can do this:
CREATE TABLE wp_usermeta_users_to_delete
( user_id BIGINT(20) NOT NULL PRIMARY KEY );
INSERT INTO wp_usermeta_users_to_delete
SELECT DISTINCT user_id FROM wp_usermeta
WHERE meta_value = “tonetone”;
DELETE A.* FROM wp_usermeta A INNER JOIN wp_usermeta_users_to_delete B USING (user_id);
DROP TABLE wp_usermeta_users_to_delete;