Hello,
Can anyone tell me how I can remove customers manually from MySQL database,
I am really desperate as I have to remove more than 30000+ customers because of spam users registration.
I am pretty it is not that difficult and would really need to know how.
Can I remove also a block of customers, like customer 20000 to 21000 with one line of code or have to do multiple.
Thanks a lot,
J Lachance
You can delete the customer and customer address in customer_entity, customer_address_entiy
once you delete customers you have to run reindex command as follows:
php bin/magento indexer:reindex
Hello, thank you for the prompt answer.
Would you happen to know if there is a way to filter the customers to delete by email address...
over 10 000 registrations come from a chinese ISP called qq.com
Email address of those spam registrations always end with qq.com
Is there a way to filter this...
Best regards,
J Lachance
Run below query to filter:
SELECT * FROM customer_entity where email like "%qq.com%";
Hello @jean-francois_l,
Please run below MySQL query for delete customer which have qq.com characters in email address
DELETE FROM `customer_entity` WHERE email like "%qq.com%";
--
If my answer is useful, please Accept as Solution & give Kudos
Please let me know still if you face any issue
Hello @Manish Mittal,
Please check question, He/She want to delete customer data not listed all customer data.
Your query doesn't delete customer data. So Please check before a given answer of the question.
--
If my answer is useful, please Accept as Solution & give Kudos
He asked how to filter with email and I have shared select query to filter.
For your reference. And second thing here we are helping others so please mind your language.