MyBB Community Forums

Full Version: How to delete all the user except admin in thru sql?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How to delete all the user except admin in thru sql? Too many spammer register in my forum.Need to clean-up.

Thanks
Try the below query, REMEMBER TO BACKUP DB BEFORE RUNNING BELOW QUERY:;

DELETE FROM `mybb_users` where uid != 1
Its better to Prune instead running this query, because those spammers may leave few traces in your forum which can't be remove with this SQL statement.

To prune, Use the built-in prune mechanism available in: AdminCP > Configurations > Prune