db-config.php 619 Bytes
Newer Older
lechuck's avatar
lechuck committed
1 2
<?php

3
// Common settings
Joe Oblivian's avatar
Joe Oblivian committed
4
$wpdb->persistent = true;
5 6
$wpdb->max_connections = 30;

7
define("NOBLOGS_BACKEND_CONFIG", "/etc/noblogs/backends");
lechuck's avatar
lechuck committed
8

9 10
include_once('r2db/db-hash.php');
include_once('r2db/db-backends.php');
lechuck's avatar
lechuck committed
11

12 13
// Add the global database (configured in wp-config.php), stores the global
// blogs and users tables.
lechuck's avatar
lechuck committed
14
$wpdb->add_database(array(
15 16 17 18 19 20 21
    "host" => DB_HOST,
    "user" => DB_USER,
    "password" => DB_PASSWORD,
    "name" => DB_NAME,
    "dataset" => "global",
    "write" => 1, "read" => 1, "timeout" => 2
    ));
lechuck's avatar
lechuck committed
22

23
$wpdb_reverse_backend_map = noblogs_load_backends(NOBLOGS_BACKEND_CONFIG, $wpdb->hash_map);