[PROBLEM SOLVED] phpMyAdmin - How to do a mass deletion of users


CharlesM

Recommended Posts

I have a Media Wiki installation, and apparently, it has a LOT of spambot registrations as users. What I want to do is to do a mass deletion of all user accounts for that wiki, with the exception of my own account.

 

I want to do this mass deletion via phpMyAdmin.

 

Can anyone explain to me, step by step, what I need to do, in order to accomplish this?

Link to comment
Share on other sites

I have a Media Wiki installation, and apparently, it has a LOT of spambot registrations as users. What I want to do is to do a mass deletion of all user accounts for that wiki, with the exception of my own account.

 

I want to do this mass deletion via phpMyAdmin.

 

Can anyone explain to me, step by step, what I need to do, in order to accomplish this?

 

Hi CharlesM,

 

It's generally ill-advised to delete things out of a database directly as sometimes they will have direct relations to other tables. The best way to do it is through the software itself as it will clean up any "loose ends". A quick Google search suggests it may be safe to delete users directly but again I would advise again it.

 

To do something like that you'd go into PHPMyAdmin in your control panel and select the database you installed MediaWiki on. From there you'll get a list of tables - one of them is likely to be named something along the lines of `users` or `user`. Select that and you'll have the option to manipulate the rows - including deleting them. Again I highly advise to not do it via this method.

Link to comment
Share on other sites

phpMyAdmin is only letting me delete 30 users at a time. I need to delete about twenty thousand, it seems - probably spampbot registrations. I believe that I have it fixed, now, so that no one new can register. I just want to delete all of the spambot accounts that were never approved. I jst don't know how to make phpMyAdmin display more than 30 users at a  time.

Link to comment
Share on other sites

I managed to figure out how to do what I wanted to do, which was to delete over twenty thousand spambot generated user accounts for my Media Wiki installation via phpMyAdmin.

 

None of these bogus user accounts had any actual postings/edit counts on the wiki.

 

What I did to fix the problem was:

 

1. Pressed SQL button.

 

2. Ran the following SQL Query:

 

DELETE FROM `wiki_user` WHERE `user_editcount` <1

 

It deleted all Media Wiki registered users except for my account, since I had postings/edit counts to my credit.

 

I took a gamble doing this, but it turned out to be what I wanted to do. I didn't want to manually delete all those thousands of registered accounts, thirty at a time. The way that I did it gave me the results that I wanted, and it took only two or three seconds to delete them all.

 

Problem solved!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...