This is so simple and showstopping it'll be something stupid on my part.
We have a 1.13 installation. I tried setting up a test wiki with 1.16b2 on the same database ("techwiki") with a new table prefix ("testwiki_").
We have a user, "admin". I tried installing 1.16b2 and got error 1044, insufficient privileges. I did, per the mediawiki.org FAQ, as root:
mysql> grant all privileges on techwiki to 'admin'@'%' identified by 'password'; Query OK, 0 rows affected (0.00 sec)
- and ran it again. I got (last lines of the install page):
# Attempting to connect to database server as admin...success. # Connected to mysql 5.0.41; enabling MySQL 4.1/5.0 charset mode # Database techwiki exists # Creating tables... done. # Initializing statistics... A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was:
SELECT user_id FROM `testwiki_user` WHERE user_name = 'WikiSysop' LIMIT 1
from within function "User::idForName". Database returned error "1146: Table 'techwiki.testwiki_user' doesn't exist (localhost)".
Looking in the database, it has *not* created any tables, so "Creating tables... done." is untrue.
So what silly thing haven't I done yet?
- d.
David Gerard wrote:
Looking in the database, it has *not* created any tables, so "Creating tables... done." is untrue.
You are right. The relevant code was:
# FIXME: Check for errors print "<li>Creating tables..."; if ($conf->DBtype == 'mysql') { $wgDatabase->sourceFile( "../maintenance/tables.sql" ); $wgDatabase->sourceFile( "../maintenance/interwiki.sql" ); } elseif (is_callable(array($wgDatabase, 'setup_database'))) { $wgDatabase->setup_database(); } else { $errs["DBtype"] = "Do not know how to handle database type '$conf->DBtype'"; continue; } print " done.</li>\n";
I have been fixing that. Can you replace your config/Installer.php with the one at http://svn.wikimedia.org/viewvc/mediawiki/branches/REL1_16/phase3/config/Ins... ?
It will probably still fail, but this time with an error message.
On 29 April 2010 23:06, Platonides Platonides@gmail.com wrote:
It will probably still fail, but this time with an error message.
It did indeed: MySQL insisting 'admin'@'localhost' didn't have the right to create tables.
My GRANT line in the previous email was wrong - the one that works is:
grant all on techwiki.* to 'admin'@'localhost' identified by 'password';
I now have a bare 1.16b2 wiki :-)
- d.
David Gerard wrote:
On 29 April 2010 23:06, Platonides Platonides@gmail.com wrote:
It will probably still fail, but this time with an error message.
It did indeed: MySQL insisting 'admin'@'localhost' didn't have the right to create tables.
My GRANT line in the previous email was wrong - the one that works is:
grant all on techwiki.* to 'admin'@'localhost' identified by 'password';
I now have a bare 1.16b2 wiki :-)
- d.
That's a disturbing feature of mysql. %@localhost has priority over admin@%
And mysql comes with a default %@localhost account. If you removed it, the previous line would also work.
mediawiki-l@lists.wikimedia.org