-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDB.php
97 lines (85 loc) · 2.26 KB
/
DB.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<?php
# WARNING: This file is publically viewable on the web. Do not put private data here.
#
# This file contains database related includes and settings.
#
# It is included by LocalSettings.php.
#
## Database settings
$wgDBtype = "mysql";
$wgDBname = $sfWikiDB . $sfwikiLanguageSuffix;
# $wgDBserver = $UESP_SERVER_DB1;
# $wgDBuser = $sfWikiUser;
# $wgDBpassword = $sfWikiPW;
# MySQL specific settings
$wgDBprefix = "";
# MySQL table options to use during installation or update
$wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=binary";
$sfWikiDBName = $sfWikiDB . $sfwikiLanguageSuffix;
if ($sfwikiIsDev)
{
$wgDBname = "sfwiki_dev" . $sfwikiLanguageSuffix;
$sfWikiDBName = $wgDBname;
$wgDBservers = array(
array( # backup1 is the only dev wiki database
'host' => $UESP_SERVER_BACKUP1,
'dbname' => $sfWikiDBName,
'user' => $sfWikiUser,
'password' => $sfWikiPW,
'type' => "mysql",
'flag' => DBO_DEFAULT,
'load' => 1,
),
);
}
else
{
$wgDBservers = array(
array( # db1 - Write Master
'host' => $UESP_SERVER_DB1,
'dbname' => $sfWikiDBName,
'user' => $sfWikiUser,
'password' => $sfWikiPW,
'type' => "mysql",
'flag' => DBO_DEFAULT,
'load' => 1,
),
array( # db2 - Primary Read
'host' => $UESP_SERVER_DB2,
'dbname' => $sfWikiDBName,
'user' => $sfWikiUser,
'password' => $sfWikiPW,
'type' => "mysql",
'flag' => DBO_DEFAULT,
'load' => 10,
'max lag' => 1000,
)
);
// Special case where we want to disable the read DB server
if ($UESP_SERVER_DBWRITE == $UESP_SERVER_DBREAD)
{
unset($wgDBservers[1]);
}
$sfWikiBackup1Db =
array( # backup1 - Backup Read
'host' => $UESP_SERVER_BACKUP1,
'dbname' => $sfWikiDBName,
'user' => $sfWikiUser,
'password' => $sfWikiPW,
'type' => "mysql",
'flag' => DBO_DEFAULT,
'load' => 10,
);
/* Don't include by default as backup lag can affect production servers */
//$wgDBservers[] = $sfWikiBackup1Db;
# Special settings for translation wikis
$wgSharedDB = $sfWikiDB;
$wgSharedPrefix = '';
$wgSharedTables[] = "actor";
$wgSharedTables[] = 'ipblocks';
$wgSharedTables[] = 'interwiki';
}
if ($sfwikiLanguageSuffix != "")
{
$wgLocalDatabases[] = $sfWikiDB;
}