- A database query error has occurred. This may indicate a bug in the software.
There are a number of reasons for this error. To get more detail add the following line to your LocalSettings.php
$wgShowSQLErrors = 1;
Now reproduce the error.
The last time I came across this issue I got an error saying that the 'searchindex' table needed to be repaired. The steps I took to fix this issue are as follows:
- Backup the searchindex table with mysqldump. (mysqldump -u user -p --databases mediawiki --tables searchindex > searchindex.sql)
- Truncate the table (truncate searchindex;)
- Verify the table is empty (select * from searchindex;)
- Run php rebuildall.php (this rebuilds all the indexes)
- You may have to run rebuildImages.php also (in my case this wasn't necessary)