Jump to content

Topic on Project:Support desk/Flow

A database query error has occurred. This may indicate a bug in the software. after deleting a user in database

4
188.60.21.70 (talkcontribs)

I have a Media Wiki installation (where only registred users can see the content) that runs fine.


One user forget his password and since I not have access to the server with ssh or to the console, I could not reset the password with the php script.

So I decided to delete the user (which not edited or created any pages or content done already) directly in the database with phpMyAdmin.

No problem to identify the user and delete it.


Then I want create a new user with the same name again, but always get the following error:


Es ist ein Datenbankabfragefehler aufgetreten. Dies könnte auf einen Fehler in der Software hindeuten.

[XWtTan8AAAIAAAteteoAAAAP] 2019-09-01 05:13:14: Fataler Ausnahmefehler des Typs „Wikimedia\Rdbms\DBQueryError“


in English it would be something like:

A database query error has occurred. This may indicate a bug in the software.

[XWtTan8AAAIAAAteteoAAAAP] 2019-09-01 05:13:14: Fatal exception error of type „Wikimedia\Rdbms\DBQueryError“


So I decided to add a user with similar name (added one charakter at the end of the username) and that worked fine.

Tried to rename that user to the old value with extension Renameuser (deleting the supplemental character) but get the same error (with different time stamp) as before


Any idea how to solve this and have a user with it's original name again ? Checked the pages fundamental introduction, Errors and symptoms, FAQ and Project:Current issues, but found no solution.

My configuration is:

Software     Version

MediaWiki     1.33.0

PHP         7.1.1 (cgi-fcgi)

MySQL         5.6.36

ICU         58.2


What is the best way to reset a password in Media Wiki when not having SSH access to the server ?

Bawolff (talkcontribs)

You should never directly edit the db unless you are very sure what you are doing. It can cause referential integrity issues. (In this case, probably a mismatch between what is in the Actor table and what is in the User table).

If you need to directly reset a password via sql, follow the instructions at Manual:Resetting_passwords

188.60.21.70 (talkcontribs)

Dear Bawolff,

your hint with the table "actor" helped me. I found there an entry with the old username and deleted it manually. Now I could re-create the user again.

And I promise not to do so again if I have a way to reset the pw within SQL (console and SSH access is not available at my hoster).

The solution by sending password by email is not possible, since much users did not enter an email address. Is there a possibility to add one of my mailadresses to get the reset pw link, change the pw and remove the mailadress again ?


I already checked the page that you mentioned before deleting the account in the db directly. But not really understand how to modify the SQL query. On the page I found for MySQL:

UPDATE `user` SET user_password = CONCAT(':B:somesalt:', MD5(CONCAT('somesalt-', MD5('somepass')))) WHERE user_name = 'someuser';


which I would change to:

UPDATE `user` SET user_password = CONCAT(':B:somesalt:', MD5(CONCAT('somesalt-', MD5('pa55word')))) WHERE user_name = 'user01';

setting a password with value "pa55word" for user "user01"

but what is the 2 values ":B:somesalt:" and "somesalt-" ? Maybe someone can explain this ?


As described in the article I checked the LocalSettings.php in the Media Wiki root folder, but not found any entries for $wgPasswordDefault.

I'm familiar with changing passwords inside the db of a joomla installation with known values, but here I have all passwords shown as "[BLOB-137 B]"


Regards

Maniac

Bawolff (talkcontribs)

somesalt is a random number. It doesnt matter what it is as long as both uses of it are the same number