Brion Vibber brion at pobox.com wrote
Tried digging into the code to add more output checks?
The script dies on Line 48 when it's trying to get a database connection...
./maintenance/convertLinks.php
45 print " DEBUG: extracting table names...\n"; 46 print " DEBUG: getting database connection : DB_MASTER...\n"; 47
48 $dbw =& wfGetDB( DB_MASTER ); <<<<< fails at this point
49 50 print " DEBUG: dbw: $dbw...\n"; 51 extract( $dbw->tableNames( 'cur', 'links', 'links_temp', 'links_backup' ) ); 52 53 print " DEBUG: running SQL: SELECT l_from FROM $links LIMIT 1 ...\n"; 54 $res = $dbw->query( "SELECT l_from FROM $links LIMIT 1" ); 55 print " DEBUG: completed SQL: SELECT l_from FROM $links LIMIT 1 ...\n"; 56 57 if ( $dbw->fieldType( $res, 0 ) == "int" ) { 58 print "Schema already converted\n"; 59 return;
Confirmed that the GRANTs on the database are correct?
In a nutshell, despite the fact that I specified 'spapp7:3307' in the wiki installation, I am unable to connect as wiki user when using 'spapp7' as the host:
# Denied when using host 'spapp7': $ mysql -u wikiuser --host spapp7 --port 3307 --password wikidb Enter password: ERROR 1045: Access denied for user: 'wikiuser@spapp7' (Using password: YES)
# Allowed when using host 'localhost' $ mysql -u wikiuser --host localhost --port 3307 --password wikidb Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 91 to server version: 4.0.24-standard
To solve the problem, I issued the following grant statement to the mysql server:
grant all on wikidb.* to 'wikiuser'@'spapp7' identified by 'password';
I then reran the mediawiki install to success!
Thanks for the assistance.
Should I report this as a bug? My thought is that when the MySQL server field name is not localhost, there should be a grant statement issued for that host for the wikiuser.
Jeff
mediawiki-l@lists.wikimedia.org