Mediawiki update problems

Linux howto's, compile information, information on whatever we learned on working with linux, MACOs and - of course - Products of the big evil....
Post Reply
User avatar
^rooker
Site Admin
Posts: 1484
Joined: Fri Aug 29, 2003 8:39 pm

Mediawiki update problems

Post by ^rooker »

[PROBLEM]
Upgrading mediawiki engine from 1.10.0 to 1.12.0, I encountered some problems when updating the database (running "maintenance/update.php"):
Adding ipb_block_email field to table ipblocks...Query "ALTER TABLE `ipblocks`
ADD ipb_block_email tinyint NOT NULL default '0'
" failed with error code "ALTER command denied to user 'xxx'@'localhost' for table 'ipblocks' (localhost)".
Articles on the wiki could be displayed, but searching led to the following error:
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 "Database::select". MySQL returned error "1146: Table 'database_name.protected_titles' doesn't exist (localhost)".
[SOLUTION]
The mysql user for accessing the wiki, "xxx@localhost" didn't have sufficient access rights.

Here's the SQL query to assign the correct rights to the user "xxx" on localhost:

Code: Select all

REVOKE ALL PRIVILEGES ON `database_name` . * FROM 'xxx'@'localhost';

GRANT SELECT ,
INSERT ,

UPDATE ,
DELETE ,
CREATE ,
DROP ,
INDEX ,
ALTER ,
CREATE TEMPORARY TABLES ,
LOCK TABLES ,
CREATE VIEW ,
SHOW VIEW ,
CREATE ROUTINE,
ALTER ROUTINE,
EXECUTE ON `database_name` . * TO 'xxx'@ 'localhost';
(Please change "database_name" and "xxx" to your database and username accordingly)
Jumping out of an airplane is not a basic instinct. Neither is breathing underwater. But put the two together and you're traveling through space!
Post Reply