1

I've tried to add a new user with phpmyadmin of my host but it didn't work. After I add a new record in user table (same of other users info) and tried to login with my new username to the MediaWiki, the system said user doesn't exist.

Nemo
  • 2,441
  • 2
  • 29
  • 63
camelope34
  • 11
  • 2

3 Answers3

6

Don't touch the database manually, if you need to do this server-side, there's a script for that called createAndPromote.php in maintenance/.

MaxSem
  • 3,457
  • 21
  • 34
1

If you want to import many user at a time ,you can use ImportUsers extension, it allows you to import a CSV file (with user list) into the system.

You can not insert records in User table for it has a password field which being encrypted by a PHP function.But for other tables like tw_group or user_groups,you can change it directly in database.

svick
  • 236,525
  • 50
  • 385
  • 514
snow8261
  • 939
  • 2
  • 14
  • 34
0

Was evaluating BlueSpice (based on MediaWiki) and came to that point, too.

Problem in my case was: In table user, column user_name, entries must have capital first letter! E.g.

|user_name|
|test     |

is not working.

|user_name|
|Test     |

is working.


Also, regarding the "password" problem mentioned in the other answer: You can create it by yourself. Here's a quick and dirty solution using some webtools.

Create random hex for salt (32 bit) https://www.browserling.com/tools/random-hex

Turn salt to base64 https://base64.guru/converter/encode/hex

Create key from password (30000 Iterations; dkLen 512; PBKDF2WithHmacSHA512) https://8gwifi.org/pbkdf.jsp

Create Key String (replace >>XX<< with the values from above)

:pbkdf2:sha512:30000:64:>>SALT_IN_BASE64<<:>>KEY_STRING<<

Ps: For the user_token I used a random 32bit hex.


Be extremely careful when making direct changes to the database. Always test extensively. This is not for newbies who copy from StackOverflow without understanding what they are doing!

frikade
  • 1
  • 1