[MediaWiki-l] Repair database after de-spamming

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[MediaWiki-l] Repair database after de-spamming

Jeffrey Walton
Hi Everyone,

On December 31, 2018 a spammer got around our defenses and created
about 11,000 accounts and associated spam. I cleaned it manually using
https://webmasters.stackexchange.com/a/45486/40589 . Effectively, all
user_id>3 were deleted and orphaned pages were deleted.

I reset the AUTO_INCREMENT to 4 on user table. I then recreated two
admin accounts by hand using mysql command line. So user_id 4 and 5
are in use. This was done so I could delete all user_id>5 if the event
happens again.

I did not set passwords for the admin users because I was not sure if
PASSWORD('XXX') was the correct format for Mediawiki. Now I am at:

# php maintenance/changePassword.php --user=AAAA --password=BBB...BBB

[f5796fb437053c310f59d201] [no req]   MWException from line 4155 of
/var/www/html/w/includes/user/User.php: CAS update failed on
user_touched for user ID '4' (read from replica); the version of the
user to be saved is older than the current version.

At this point I have run update.php, rebuildall.php and performed a mysqlcheck:

    mysqlcheck --all-databases --auto-repair --user=XXX--password=YYY

All the repair attempts are succeeding, but the problem still exists.
I've got a feeling I have not run the correct php script in
maintenance/.

How do I fix whatever is wrong here?

Thanks in advance.

_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Repair database after de-spamming

Niklas Laxström
Check whether user_touched is set.

See https://phabricator.wikimedia.org/T197472

  -Niklas

ke 23. tammik. 2019 klo 11.53 Jeffrey Walton ([hidden email]) kirjoitti:

> Hi Everyone,
>
> On December 31, 2018 a spammer got around our defenses and created
> about 11,000 accounts and associated spam. I cleaned it manually using
> https://webmasters.stackexchange.com/a/45486/40589 . Effectively, all
> user_id>3 were deleted and orphaned pages were deleted.
>
> I reset the AUTO_INCREMENT to 4 on user table. I then recreated two
> admin accounts by hand using mysql command line. So user_id 4 and 5
> are in use. This was done so I could delete all user_id>5 if the event
> happens again.
>
> I did not set passwords for the admin users because I was not sure if
> PASSWORD('XXX') was the correct format for Mediawiki. Now I am at:
>
> # php maintenance/changePassword.php --user=AAAA --password=BBB...BBB
>
> [f5796fb437053c310f59d201] [no req]   MWException from line 4155 of
> /var/www/html/w/includes/user/User.php: CAS update failed on
> user_touched for user ID '4' (read from replica); the version of the
> user to be saved is older than the current version.
>
> At this point I have run update.php, rebuildall.php and performed a
> mysqlcheck:
>
>     mysqlcheck --all-databases --auto-repair --user=XXX--password=YYY
>
> All the repair attempts are succeeding, but the problem still exists.
> I've got a feeling I have not run the correct php script in
> maintenance/.
>
> How do I fix whatever is wrong here?
>
> Thanks in advance.
>
> _______________________________________________
> MediaWiki-l mailing list
> To unsubscribe, go to:
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>
_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l