From LedHed's Wiki
Jump to: navigation, search
(Created page with "*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...")
 
(2 intermediate revisions by the same user not shown)
Line 6: Line 6:
 
The last time I came across this issue I got an error saying that the 'searchindex' table needed to be repaired.
 
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:
 
The steps I took to fix this issue are as follows:
#Backup the searchindex tablw with mysqldump. (mysqldump -u user -p --databases mediawiki --tables searchindex > searchindex.sql)
+
#Backup the searchindex table with mysqldump. (mysqldump -u user -p --databases mediawiki --tables searchindex > searchindex.sql)
 
#Truncate the table (truncate searchindex;)
 
#Truncate the table (truncate searchindex;)
 
#Verify the table is empty (select * from searchindex;)
 
#Verify the table is empty (select * from searchindex;)
Line 14: Line 14:
  
 
== Reference ==
 
== Reference ==
http://www.mediawiki.org/wiki/Thread:Project:Support_desk/Database_error_in_upgrading_from_1.18_to_1.22
+
http://www.mediawiki.org/wiki/Thread:Project:Support_desk/Database_error_in_upgrading_from_1.18_to_1.22 <br>
http://www.mediawiki.org/wiki/Manual:Rebuildall.php
+
http://www.mediawiki.org/wiki/Manual:Rebuildall.php <br>
 +
 
  
  
  
 
[[Category:MediaWiki]]
 
[[Category:MediaWiki]]

Revision as of 18:35, 16 December 2014

  • 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:

  1. Backup the searchindex table with mysqldump. (mysqldump -u user -p --databases mediawiki --tables searchindex > searchindex.sql)
  2. Truncate the table (truncate searchindex;)
  3. Verify the table is empty (select * from searchindex;)
  4. Run php rebuildall.php (this rebuilds all the indexes)
  5. You may have to run rebuildImages.php also (in my case this wasn't necessary)


Reference

http://www.mediawiki.org/wiki/Thread:Project:Support_desk/Database_error_in_upgrading_from_1.18_to_1.22
http://www.mediawiki.org/wiki/Manual:Rebuildall.php