Upgrading mediawiki engine from 1.10.0 to 1.12.0, I encountered some problems when updating the database (running "maintenance/update.php"):
Articles on the wiki could be displayed, but searching led to the following error: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)".
[SOLUTION]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)".
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';