Page 1 of 1

Mediawiki update problems

Posted: Mon Apr 14, 2008 1:22 pm
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)