Syscore wiki administration

From Syscore

(Redirected from SysCore wiki administration)

This page is a guide for anyone who has to provide care and maintanence to this wiki.

MySQL "searchindex" Error

This looks something like:

A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was:

(SQL query hidden)

from within function "SearchUpdate::doUpdate". MySQL returned error "1034: Incorrect key file for table 'searchindex'; try to repair it (syscoredb.umbc.edu)".

The fix

The index table has to be regenerated. Go to the wiki directory /afs/umbc.edu/public/www/oit/iss/syscore/mw and run the rebuildtextindex.php script. It should be run with the same php that the webserver is running.

For example:

$ /afs/.umbc.edu/admin/www/uber/003/sun4x_58/bin/php rebuildtextindex.php
Dropping index...
Rebuilding index fields for 1412 pages...
0
500
1000
Rebuild the index...
Done.

This run took less than a minute, so I wouldn't worry about downtime.

Reset a user password

I have no idea why there isn't a page to do this, but here's the secret sql command:

Connect to the database:

$ mysql -h syscoredb.umbc.edu -u syscore_wiki -D syscore_wiki --password=<password>

Get the user id:

SELECT user_id, user_name FROM user;

Change the password using the retrieved userid:

UPDATE user SET user_password = md5(CONCAT('123-',md5('newpassword'))) WHERE user_id=123;