db.inc.php
4.18 KB
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
<?php
$db_config = array(
'master' => array(
//关键字以数据库名作为键值
BASEDB_BASEDBNAME_KEY => array(
'host' => '192.168.7.250',
'user' => 'yohoi_beat',
'pwd' => 'yohoi_beat',
'dbname' => 'yohoi_beat',
'port' => 3306,
),
BASEDB_APPDBNAME_KEY => array(
'host' => '192.168.7.2',
'user' => 'yohoi_app',
'pwd' => 'yohoi_app',
'dbname' => 'yohoi_app',
'port' => 3306,
),
),
'slave' => array(
BASEDB_BASEDBNAME_KEY => array(
array(
'host' => '192.168.7.251',
'user' => 'yohoi_beat',
'pwd' => 'yohoi_beat',
'dbname' => 'yohoi_beat',
'port' => 3306,
'weight' => 0,/*权值,权值越大,使用率越高*/
),
array(
'host' => '192.168.7.252',
'user' => 'yohoi_beat',
'pwd' => 'yohoi_beat',
'dbname' => 'yohoi_beat',
'port' => 3306,
'weight' => 0,/*权值,权值越大,使用率越高*/
),
),
BASEDB_APPDBNAME_KEY => array(
array(
'host' => '192.168.7.3',
'user' => 'yohoi_app',
'pwd' => 'yohoi_app',
'dbname' => 'yohoi_app',
'port' => 3306,
)
),
)
);
?>