Jump to content

4.0 Database Config Settings

KT Walrus

Recommended Posts

I use both RoundCube and IPB. I like RoundCube's database config settings better than IPB. Specifically, I like being able to set the db to use for write operations separate from read operations. This helps greatly if you need to set up database replication (master/slaves). I also like the ability to assign some tables update on the slave only (like for cache tables or possibly session tables).

Here are the relevant RoundCube settings:

// ----------------------------------


// ----------------------------------
// Database connection string (DSN) for read+write operations

// Format (compatible with PEAR MDB2): db_provider://user:password@host/database

// Currently supported db_providers: mysql, pgsql, sqlite, mssql or sqlsrv

// For examples see http://pear.php.net/manual/en/package.database.mdb2.intro-dsn.php

// NOTE: for SQLite use absolute path: 'sqlite:////full/path/to/sqlite.db?mode=0646'

$config['db_dsnw'] = 'mysql://roundcube:@localhost/roundcubemail';
// Database DSN for read-only operations (if empty write database will be used)

// useful for database replication

$config['db_dsnr'] = '';
// Disable the use of already established dsnw connections for subsequent reads

$config['db_dsnw_noread'] = false;
// use persistent db-connections

// beware this will not "always" work as expected

// see: http://www.php.net/manual/en/features.persistent-connections.php

$config['db_persistent'] = false;
// you can define specific table (and sequence) names prefix

$config['db_prefix'] = '';
// Mapping of table names and connections to use for ALL operations.

// This can be used in a setup with replicated databases and a DB master

// where read/write access to cache tables should not go to master.

$config['db_table_dsn'] = array(

//    'cache' => 'r',

//    'cache_index' => 'r',

//    'cache_thread' => 'r',

//    'cache_messages' => 'r',

Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...