$conf->DBuser = importPost( "DBuser", "wikiuser" );
$conf->DBpassword = importPost( "DBpassword" );
$conf->DBpassword2 = importPost( "DBpassword2" );
+ $conf->DBprefix = importPost( "DBprefix" );
$conf->RootPW = importPost( "RootPW" );
$conf->LanguageCode = importPost( "LanguageCode", "en" );
$conf->SysopName = importPost( "SysopName", "WikiSysop" );
if( $conf->DBpassword != $conf->DBpassword2 ) {
$errs["DBpassword2"] = "Passwords don't match!";
}
+if( !preg_match( '/^[A-Za-z_0-9]*$/', $conf->DBprefix ) ) {
+ $errs["DBprefix"] = "Invalid table prefix";
+}
if( $conf->SysopPass == "" ) {
$errs["SysopPass"] = "Must not be blank";
eval($local);
$wgDBadminuser = "root";
$wgDBadminpassword = $conf->RootPW;
+ $wgDBprefix = $conf->DBprefix;
$wgCommandLineMode = true;
$wgUseDatabaseMessages = false; /* FIXME: For database failure */
require_once( "includes/Setup.php" );
print " done.</li>\n";
print "<li>Initializing data...";
- $wgDatabase->query( "INSERT INTO site_stats (ss_row_id,ss_total_views," .
- "ss_total_edits,ss_good_articles) VALUES (1,0,0,0)" );
+ $wgDatabase->insert( 'site_stats',
+ array( 'ss_row_id' => 1,
+ 'ss_total_views' => 0,
+ 'ss_total_edits' => 0,
+ 'ss_good_articles' => 0 ) );
# setting up the db user
if( $conf->Root ) {
print "<li>Granting user permissions...</li>\n";
print "<li>Skipped sysop account creation, no name given.</li>\n";
}
- print "<li>Initialising log pages...";
- $logs = array(
- "uploadlogpage" => "uploadlogpagetext",
- "dellogpage" => "dellogpagetext",
- "protectlogpage" => "protectlogtext",
- "blocklogpage" => "blocklogtext"
- );
- $metaNamespace = Namespace::getWikipedia();
+ $titleobj = Title::newFromText( wfMsgNoDB( "mainpage" ) );
$now = wfTimestampNow();
$won = wfInvertTimestamp( $now );
- foreach( $logs as $page => $text ) {
- $logTitle = $wgDatabase->strencode( $wgLang->ucfirst( str_replace( " ", "_", wfMsgNoDB( $page ) ) ) );
- $logText = $wgDatabase->strencode( wfMsgNoDB( $text ) );
- $wgDatabase->query( "INSERT INTO cur (cur_namespace,cur_title,cur_text," .
- "cur_restrictions,cur_timestamp,inverse_timestamp,cur_touched) " .
- "VALUES ($metaNamespace,'$logTitle','$logText','sysop','$now','$won','$now')" );
- }
- print "</li>\n";
-
- $titleobj = Title::newFromText( wfMsgNoDB( "mainpage" ) );
- $title = $titleobj->getDBkey();
- $sql = "INSERT INTO cur (cur_namespace,cur_title,cur_text,cur_timestamp,inverse_timestamp,cur_touched,cur_user,cur_user_text) " .
- "VALUES (0,'$title','" .
- wfStrencode( wfMsg( "mainpagetext" ) . "\n\n" . wfMsg( "mainpagedocfooter" ) ) .
- "','$now','$won','$now',0,'MediaWiki default')";
- $wgDatabase->query( $sql, $fname );
+ $wgDatabase->insert( 'cur',
+ array( 'cur_namespace' => $titleobj->getNamespace(),
+ 'cur_title' => $titleobj->getDBkey(),
+ 'cur_text' => wfMsg( 'mainpagetext' ) . "\n\n" .
+ wfMsg( 'mainpagedocfooter' ),
+ 'cur_timestamp' => $now,
+ 'inverse_timestamp' => $won,
+ 'cur_touched' => $now,
+ 'cur_user' => 0,
+ 'cur_user_text' => 'MediaWiki default' ) );
print "<li><pre>";
initialiseMessages();
you can specify new accounts/databases to be created.
</dt>
+ <dd><?php
+ aField( $conf, "DBprefix", "Database table prefix" );
+ ?></dd>
+ <dt>
+ <p>If you need to share one database between multiple wikis, or
+ MediaWiki and another web application, you may choose to
+ add a prefix to all the table names to avoid conflicts.</p>
+
+ <p>Avoid exotic characters; something like <tt>mw_</tt> is good.</p>
+ </dt>
<dd>
<?php
\$wgDBname = \"{$slconf['DBname']}\";
\$wgDBuser = \"{$slconf['DBuser']}\";
\$wgDBpassword = \"{$slconf['DBpassword']}\";
+\$wgDBprefix = \"{$slconf['DBprefix']}\";
## To allow SQL queries through the wiki's Special:Askaql page,
## uncomment the next lines. THIS IS VERY INSECURE. If you want
# \$wgDBsqluser = \"sqluser\";
# \$wgDBsqlpassword = \"sqlpass\";
+# If you're on MySQL 3.x, this next line must be FALSE:
\$wgDBmysql4 = \$wgEnablePersistentLC = {$conf->DBmysql4};
## Shared memory settings
$varnames = array(
"wgDBserver", "wgDBname", "wgDBintlname", "wgDBuser",
"wgDBpassword", "wgDBsqluser", "wgDBsqlpassword",
- "wgDBadminuser", "wgDBadminpassword"
+ "wgDBadminuser", "wgDBadminpassword", "wgDBprefix"
);
foreach ( $varnames as $var ) {
global $$var;
$ins = str_replace( '{$' . $var . '}', $$var, $ins );
+ $ins = str_replace( '/*$' . $var . '*/`', '`' . $$var, $ins );
+ $ins = str_replace( '/*$' . $var . '*/', $$var, $ins );
}
return $ins;
}
}
}
- $dbw->insert( $cur, $arr, $fname );
+ $dbw->insert( 'cur', $arr, $fname );
# Clear the relevant memcached key
print 'Clearing message cache...';
-- Should probably be inserted when someone create a new database
--
-INSERT INTO `group` (group_id,group_name,group_description,group_rights)
+INSERT INTO /*$wgDBprefix*/`group` (group_id,group_name,group_description,group_rights)
VALUES (1,'Anonymous','Anonymous users','read,edit,createaccount');
-INSERT INTO `group` (group_id,group_name,group_description,group_rights)
+INSERT INTO /*$wgDBprefix*/`group` (group_id,group_name,group_description,group_rights)
VALUES (2,'Loggedin','General logged in users','read,edit,move,upload');
-INSERT INTO `group` (group_id,group_name,group_description,group_rights)
+INSERT INTO /*$wgDBprefix*/`group` (group_id,group_name,group_description,group_rights)
VALUES (3,'Sysops','Operators of this site','read,edit,move,delete,undelete,protect,block,upload,asksql,rollback,patrol,editinterface,sysop');
-INSERT INTO `group` (group_id,group_name,group_description,group_rights)
+INSERT INTO /*$wgDBprefix*/`group` (group_id,group_name,group_description,group_rights)
VALUES (4,'Bureaucrat','The bureaucrat group is able to make sysops for example. They have no other rights.','read,edit,move,delete,undelete,protect,block,userrights,createaccount,upload,asksql,rollback,patrol,editinterface,siteadmin,sysop');
set @oldname = 'At18';
set @newname = 'Alfio';
-update low_priority user set user_name=@newname where user_name=@oldname;
-update low_priority user_newtalk set user_ip=@newname where user_ip=@oldname;
-update low_priority cur set cur_user_text=@newname where cur_user_text=@oldname;
-update low_priority old set old_user_text=@newname where old_user_text=@oldname;
-update low_priority archive set ar_user_text=@newname where ar_user_text=@oldname;
-update low_priority ipblocks set ipb_address=@newname where ipb_address=@oldname;
-update low_priority oldimage set oi_user_text=@newname where oi_user_text=@oldname;
-update low_priority recentchanges set rc_user_text=@newname where rc_user_text=@oldname;
+update low_priority /*$wgDBprefix*/user set user_name=@newname where user_name=@oldname;
+update low_priority /*$wgDBprefix*/user_newtalk set user_ip=@newname where user_ip=@oldname;
+update low_priority /*$wgDBprefix*/cur set cur_user_text=@newname where cur_user_text=@oldname;
+update low_priority /*$wgDBprefix*/old set old_user_text=@newname where old_user_text=@oldname;
+update low_priority /*$wgDBprefix*/archive set ar_user_text=@newname where ar_user_text=@oldname;
+update low_priority /*$wgDBprefix*/ipblocks set ipb_address=@newname where ipb_address=@oldname;
+update low_priority /*$wgDBprefix*/oldimage set oi_user_text=@newname where oi_user_text=@oldname;
+update low_priority /*$wgDBprefix*/recentchanges set rc_user_text=@newname where rc_user_text=@oldname;
-- Based more or less on the public interwiki map from MeatballWiki
-- Default interwiki prefixes...
-REPLACE INTO interwiki (iw_prefix,iw_url,iw_local) VALUES
+REPLACE INTO /*$wgDBprefix*/interwiki (iw_prefix,iw_url,iw_local) VALUES
('AbbeNormal','http://www.ourpla.net/cgi-bin/pikie.cgi?$1',0),
('AcadWiki','http://xarch.tu-graz.ac.at/autocad/wiki/$1',0),
('Acronym','http://www.acronymfinder.com/af-query.asp?String=exact&Acronym=$1',0),
-- Recalculate the article count
--
-SELECT @foo:=COUNT(*) FROM cur
+SELECT @foo:=COUNT(*) FROM /*$wgDBprefix*/cur
WHERE cur_namespace=0 AND cur_is_redirect=0 AND cur_text like '%[[%';
-UPDATE site_stats SET ss_good_articles=@foo;
+UPDATE /*$wgDBprefix*/site_stats SET ss_good_articles=@foo;
--
-- Indexes should be defined here; please import the rest from indexes.sql.
-CREATE TABLE user (
+CREATE TABLE /*$wgDBprefix*/user (
user_id int(5) unsigned NOT NULL auto_increment,
user_name varchar(255) binary NOT NULL default '',
user_real_name varchar(255) binary NOT NULL default '',
);
-- TODO: de-blob this; it should be a property table
-CREATE TABLE user_rights (
+CREATE TABLE /*$wgDBprefix*/user_rights (
ur_user int(5) unsigned NOT NULL,
ur_rights tinyblob NOT NULL default '',
UNIQUE KEY ur_user (ur_user)
);
-CREATE TABLE user_newtalk (
+CREATE TABLE /*$wgDBprefix*/user_newtalk (
user_id int(5) NOT NULL default '0',
user_ip varchar(40) NOT NULL default '',
INDEX user_id (user_id),
INDEX user_ip (user_ip)
);
-CREATE TABLE cur (
+CREATE TABLE /*$wgDBprefix*/cur (
cur_id int(8) unsigned NOT NULL auto_increment,
cur_namespace tinyint(2) unsigned NOT NULL default '0',
cur_title varchar(255) binary NOT NULL default '',
INDEX namespace_redirect_timestamp(cur_namespace,cur_is_redirect,cur_timestamp)
);
-CREATE TABLE old (
+CREATE TABLE /*$wgDBprefix*/old (
old_id int(8) unsigned NOT NULL auto_increment,
old_namespace tinyint(2) unsigned NOT NULL default '0',
old_title varchar(255) binary NOT NULL default '',
INDEX usertext_timestamp (old_user_text,inverse_timestamp)
);
-CREATE TABLE archive (
+CREATE TABLE /*$wgDBprefix*/archive (
ar_namespace tinyint(2) unsigned NOT NULL default '0',
ar_title varchar(255) binary NOT NULL default '',
ar_text mediumtext NOT NULL default '',
-- Track links that do exist
-- l_from and l_to key to cur_id
--
-CREATE TABLE links (
+CREATE TABLE /*$wgDBprefix*/links (
l_from int(8) unsigned NOT NULL default '0',
l_to int(8) unsigned NOT NULL default '0',
UNIQUE KEY l_from(l_from,l_to),
-- bl_from keys to cur_id
-- bl_to is a text link (namespace:title)
--
-CREATE TABLE brokenlinks (
+CREATE TABLE /*$wgDBprefix*/brokenlinks (
bl_from int(8) unsigned NOT NULL default '0',
bl_to varchar(255) binary NOT NULL default '',
UNIQUE KEY bl_from(bl_from,bl_to),
-- il_from keys to cur_id, il_to keys to image_name.
-- We don't distinguish live from broken links.
--
-CREATE TABLE imagelinks (
+CREATE TABLE /*$wgDBprefix*/imagelinks (
il_from int(8) unsigned NOT NULL default '0',
il_to varchar(255) binary NOT NULL default '',
UNIQUE KEY il_from(il_from,il_to),
-- cl_sortkey is the title of the linking page or an optional override
-- cl_timestamp marks when the link was last added
--
-CREATE TABLE categorylinks (
+CREATE TABLE /*$wgDBprefix*/categorylinks (
cl_from int(8) unsigned NOT NULL default '0',
cl_to varchar(255) binary NOT NULL default '',
cl_sortkey varchar(255) binary NOT NULL default '',
-- cache arrays to reduce database load slurping up
-- from links and brokenlinks.
--
-CREATE TABLE linkscc (
+CREATE TABLE /*$wgDBprefix*/linkscc (
lcc_pageid INT UNSIGNED NOT NULL UNIQUE KEY,
lcc_cacheobj MEDIUMBLOB NOT NULL
);
-CREATE TABLE site_stats (
+CREATE TABLE /*$wgDBprefix*/site_stats (
ss_row_id int(8) unsigned NOT NULL,
ss_total_views bigint(20) unsigned default '0',
ss_total_edits bigint(20) unsigned default '0',
UNIQUE KEY ss_row_id (ss_row_id)
);
-CREATE TABLE hitcounter (
+CREATE TABLE /*$wgDBprefix*/hitcounter (
hc_id INTEGER UNSIGNED NOT NULL
) TYPE=HEAP MAX_ROWS=25000;
-CREATE TABLE ipblocks (
+CREATE TABLE /*$wgDBprefix*/ipblocks (
ipb_id int(8) NOT NULL auto_increment,
ipb_address varchar(40) binary NOT NULL default '',
ipb_user int(8) unsigned NOT NULL default '0',
INDEX ipb_user (ipb_user)
);
-CREATE TABLE image (
+CREATE TABLE /*$wgDBprefix*/image (
img_name varchar(255) binary NOT NULL default '',
img_size int(8) unsigned NOT NULL default '0',
img_description tinyblob NOT NULL default '',
INDEX img_timestamp (img_timestamp)
);
-CREATE TABLE oldimage (
+CREATE TABLE /*$wgDBprefix*/oldimage (
oi_name varchar(255) binary NOT NULL default '',
oi_archive_name varchar(255) binary NOT NULL default '',
oi_size int(8) unsigned NOT NULL default 0,
INDEX oi_name (oi_name(10))
);
-CREATE TABLE recentchanges (
+CREATE TABLE /*$wgDBprefix*/recentchanges (
rc_id int(8) NOT NULL auto_increment,
rc_timestamp varchar(14) binary NOT NULL default '',
rc_cur_time varchar(14) binary NOT NULL default '',
INDEX rc_ip (rc_ip)
);
-CREATE TABLE watchlist (
+CREATE TABLE /*$wgDBprefix*/watchlist (
wl_user int(5) unsigned NOT NULL,
wl_namespace tinyint(2) unsigned NOT NULL default '0',
wl_title varchar(255) binary NOT NULL default '',
KEY namespace_title (wl_namespace,wl_title)
);
-CREATE TABLE math (
+CREATE TABLE /*$wgDBprefix*/math (
math_inputhash varchar(16) NOT NULL,
math_outputhash varchar(16) NOT NULL,
math_html_conservativeness tinyint(1) NOT NULL,
-- Table searchindex must be MyISAM for fulltext support
-CREATE TABLE searchindex (
+CREATE TABLE /*$wgDBprefix*/searchindex (
si_page int(8) unsigned NOT NULL,
si_title varchar(255) NOT NULL default '',
si_text mediumtext NOT NULL default '',
) TYPE=MyISAM;
-CREATE TABLE interwiki (
+CREATE TABLE /*$wgDBprefix*/interwiki (
iw_prefix char(32) NOT NULL,
iw_url char(127) NOT NULL,
iw_local BOOL NOT NULL,
);
-- Used for caching expensive grouped queries
-CREATE TABLE querycache (
+CREATE TABLE /*$wgDBprefix*/querycache (
qc_type char(32) NOT NULL,
qc_value int(5) unsigned NOT NULL default '0',
qc_namespace tinyint(2) unsigned NOT NULL default '0',
);
-- For a few generic cache operations if not using Memcached
-CREATE TABLE objectcache (
+CREATE TABLE /*$wgDBprefix*/objectcache (
keyname char(255) binary not null default '',
value mediumblob,
exptime datetime,
);
-- For storing revision text
-CREATE TABLE blobs (
+CREATE TABLE /*$wgDBprefix*/blobs (
blob_index char(255) binary NOT NULL default '',
blob_data longblob NOT NULL default '',
UNIQUE key blob_index (blob_index)
-- For article validation
-CREATE TABLE `validate` (
+CREATE TABLE /*$wgDBprefix*/validate (
`val_user` int(11) NOT NULL default '0',
`val_title` varchar(255) binary NOT NULL default '',
`val_timestamp` varchar(14) binary NOT NULL default '',
);
-CREATE TABLE logging (
+CREATE TABLE /*$wgDBprefix*/logging (
-- Symbolic keys for the general log type and the action type
-- within the log. The output format will be controlled by the
-- action field, but only the type controls categorization.
-- Hold group name and description
-CREATE TABLE `group` (
+CREATE TABLE /*$wgDBprefix*/`group` (
group_id int(5) unsigned NOT NULL auto_increment,
group_name varchar(50) NOT NULL default '',
group_description varchar(255) NOT NULL default '',
);
-- Relation table between user and groups
-CREATE TABLE user_groups (
+CREATE TABLE /*$wgDBprefix*/user_groups (
ug_user int(5) unsigned NOT NULL default '0',
ug_group int(5) unsigned NOT NULL default '0',
PRIMARY KEY (ug_user,ug_group)
TO {$wgDBuser}@localhost IDENTIFIED BY '{$wgDBpassword}';
GRANT DELETE,INSERT,SELECT,UPDATE ON `{$wgDBname}`.*
TO {$wgDBuser}@localhost.localdomain IDENTIFIED BY '{$wgDBpassword}';
-
-GRANT SELECT (user_id,user_name,user_options) ON `{$wgDBname}`.user
- TO {$wgDBsqluser}@'%' IDENTIFIED BY '{$wgDBsqlpassword}';
-GRANT SELECT ON `{$wgDBname}`.user_rights
- TO {$wgDBsqluser}@'%' IDENTIFIED BY '{$wgDBsqlpassword}';
-GRANT SELECT ON `{$wgDBname}`.cur
- TO {$wgDBsqluser}@'%' IDENTIFIED BY '{$wgDBsqlpassword}';
-GRANT SELECT ON `{$wgDBname}`.old
- TO {$wgDBsqluser}@'%' IDENTIFIED BY '{$wgDBsqlpassword}';
-GRANT SELECT ON `{$wgDBname}`.archive
- TO {$wgDBsqluser}@'%' IDENTIFIED BY '{$wgDBsqlpassword}';
-GRANT SELECT ON `{$wgDBname}`.links
- TO {$wgDBsqluser}@'%' IDENTIFIED BY '{$wgDBsqlpassword}';
-GRANT SELECT ON `{$wgDBname}`.brokenlinks
- TO {$wgDBsqluser}@'%' IDENTIFIED BY '{$wgDBsqlpassword}';
-GRANT SELECT ON `{$wgDBname}`.imagelinks
- TO {$wgDBsqluser}@'%' IDENTIFIED BY '{$wgDBsqlpassword}';
-GRANT SELECT ON `{$wgDBname}`.site_stats
- TO {$wgDBsqluser}@'%' IDENTIFIED BY '{$wgDBsqlpassword}';
-GRANT SELECT ON `{$wgDBname}`.ipblocks
- TO {$wgDBsqluser}@'%' IDENTIFIED BY '{$wgDBsqlpassword}';
-GRANT SELECT ON `{$wgDBname}`.image
- TO {$wgDBsqluser}@'%' IDENTIFIED BY '{$wgDBsqlpassword}';
-GRANT SELECT ON `{$wgDBname}`.oldimage
- TO {$wgDBsqluser}@'%' IDENTIFIED BY '{$wgDBsqlpassword}';
-GRANT SELECT ON `{$wgDBname}`.recentchanges
- TO {$wgDBsqluser}@'%' IDENTIFIED BY '{$wgDBsqlpassword}';
-GRANT SELECT ON `{$wgDBname}`.watchlist
- TO {$wgDBsqluser}@'%' IDENTIFIED BY '{$wgDBsqlpassword}';
-GRANT SELECT ON `{$wgDBname}`.math
- TO {$wgDBsqluser}@'%' IDENTIFIED BY '{$wgDBsqlpassword}';
-
-GRANT SELECT (user_id,user_name,user_options)
- ON `{$wgDBname}`.user
- TO {$wgDBsqluser}@localhost IDENTIFIED BY '{$wgDBsqlpassword}';
-GRANT SELECT ON `{$wgDBname}`.user_rights
- TO {$wgDBsqluser}@localhost IDENTIFIED BY '{$wgDBsqlpassword}';
-GRANT SELECT ON `{$wgDBname}`.cur
- TO {$wgDBsqluser}@localhost IDENTIFIED BY '{$wgDBsqlpassword}';
-GRANT SELECT ON `{$wgDBname}`.old
- TO {$wgDBsqluser}@localhost IDENTIFIED BY '{$wgDBsqlpassword}';
-GRANT SELECT ON `{$wgDBname}`.archive
- TO {$wgDBsqluser}@localhost IDENTIFIED BY '{$wgDBsqlpassword}';
-GRANT SELECT ON `{$wgDBname}`.links
- TO {$wgDBsqluser}@localhost IDENTIFIED BY '{$wgDBsqlpassword}';
-GRANT SELECT ON `{$wgDBname}`.brokenlinks
- TO {$wgDBsqluser}@localhost IDENTIFIED BY '{$wgDBsqlpassword}';
-GRANT SELECT ON `{$wgDBname}`.imagelinks
- TO {$wgDBsqluser}@localhost IDENTIFIED BY '{$wgDBsqlpassword}';
-GRANT SELECT ON `{$wgDBname}`.site_stats
- TO {$wgDBsqluser}@localhost IDENTIFIED BY '{$wgDBsqlpassword}';
-GRANT SELECT ON `{$wgDBname}`.ipblocks
- TO {$wgDBsqluser}@localhost IDENTIFIED BY '{$wgDBsqlpassword}';
-GRANT SELECT ON `{$wgDBname}`.image
- TO {$wgDBsqluser}@localhost IDENTIFIED BY '{$wgDBsqlpassword}';
-GRANT SELECT ON `{$wgDBname}`.oldimage
- TO {$wgDBsqluser}@localhost IDENTIFIED BY '{$wgDBsqlpassword}';
-GRANT SELECT ON `{$wgDBname}`.recentchanges
- TO {$wgDBsqluser}@localhost IDENTIFIED BY '{$wgDBsqlpassword}';
-GRANT SELECT ON `{$wgDBname}`.watchlist
- TO {$wgDBsqluser}@localhost IDENTIFIED BY '{$wgDBsqlpassword}';
-GRANT SELECT ON `{$wgDBname}`.math
- TO {$wgDBsqluser}@localhost IDENTIFIED BY '{$wgDBsqlpassword}';
-
-GRANT SELECT (user_id,user_name,user_options)
- ON `{$wgDBname}`.user
- TO {$wgDBsqluser}@localhost.localdomain IDENTIFIED BY '{$wgDBsqlpassword}';
-GRANT SELECT ON `{$wgDBname}`.user_rights
- TO {$wgDBsqluser}@localhost.localdomain IDENTIFIED BY '{$wgDBsqlpassword}';
-GRANT SELECT ON `{$wgDBname}`.cur
- TO {$wgDBsqluser}@localhost.localdomain IDENTIFIED BY '{$wgDBsqlpassword}';
-GRANT SELECT ON `{$wgDBname}`.old
- TO {$wgDBsqluser}@localhost.localdomain IDENTIFIED BY '{$wgDBsqlpassword}';
-GRANT SELECT ON `{$wgDBname}`.archive
- TO {$wgDBsqluser}@localhost.localdomain IDENTIFIED BY '{$wgDBsqlpassword}';
-GRANT SELECT ON `{$wgDBname}`.links
- TO {$wgDBsqluser}@localhost.localdomain IDENTIFIED BY '{$wgDBsqlpassword}';
-GRANT SELECT ON `{$wgDBname}`.brokenlinks
- TO {$wgDBsqluser}@localhost.localdomain IDENTIFIED BY '{$wgDBsqlpassword}';
-GRANT SELECT ON `{$wgDBname}`.imagelinks
- TO {$wgDBsqluser}@localhost.localdomain IDENTIFIED BY '{$wgDBsqlpassword}';
-GRANT SELECT ON `{$wgDBname}`.site_stats
- TO {$wgDBsqluser}@localhost.localdomain IDENTIFIED BY '{$wgDBsqlpassword}';
-GRANT SELECT ON `{$wgDBname}`.ipblocks
- TO {$wgDBsqluser}@localhost.localdomain IDENTIFIED BY '{$wgDBsqlpassword}';
-GRANT SELECT ON `{$wgDBname}`.image
- TO {$wgDBsqluser}@localhost.localdomain IDENTIFIED BY '{$wgDBsqlpassword}';
-GRANT SELECT ON `{$wgDBname}`.oldimage
- TO {$wgDBsqluser}@localhost.localdomain IDENTIFIED BY '{$wgDBsqlpassword}';
-GRANT SELECT ON `{$wgDBname}`.recentchanges
- TO {$wgDBsqluser}@localhost.localdomain IDENTIFIED BY '{$wgDBsqlpassword}';
-GRANT SELECT ON `{$wgDBname}`.watchlist
- TO {$wgDBsqluser}@localhost.localdomain IDENTIFIED BY '{$wgDBsqlpassword}';
-GRANT SELECT ON `{$wgDBname}`.math
- TO {$wgDBsqluser}@localhost.localdomain IDENTIFIED BY '{$wgDBsqlpassword}';
-
-- For convenience, here are the *in-project* interwiki prefixes
-- for Wikipedia.
-REPLACE INTO interwiki (iw_prefix,iw_url,iw_local) VALUES
+REPLACE INTO /*$wgDBprefix*/interwiki (iw_prefix,iw_url,iw_local) VALUES
('w','http://www.wikipedia.org/wiki/$1',1),
('m','http://meta.wikipedia.org/wiki/$1',1),
('meta','http://meta.wikipedia.org/wiki/$1',1),
-- For convenience, here are the *in-project* interwiki prefixes
-- for Wikipedia.
-REPLACE INTO interwiki (iw_prefix,iw_url,iw_local) VALUES
+REPLACE INTO /*$wgDBprefix*/interwiki (iw_prefix,iw_url,iw_local) VALUES
('w','http://www.wikipedia.org/wiki/$1',1),
('m','http://meta.wikipedia.org/wiki/$1',1),
('meta','http://meta.wikipedia.org/wiki/$1',1),