Closed (fixed)
Project:
MongoDB
Version:
7.x-1.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
28 Aug 2011 at 19:31 UTC
Updated:
1 Jul 2012 at 07:16 UTC
Currently, the only database created is the "Drupal" database in MongoDB, with no way to define this in the module. This is a major design issue in that multiple Drupal systems on the same server overwrite the other Drupal server documents IDs!
The way to fix this is to allow for the naming of the Drupal database in MongoDB, with only the default name as Drupal. Also if possible to check to see if there is already a Drupal database name in MongoDB and to name it Drupal_1 etc.
Comments
Comment #1
dob_ commentedIt's possible to change the database name via settings.php.
Example configuration
$conf['mongodb_connections'] = array(
'mongohost' => array('host' => 'localhost', 'db' => 'mydatabase'),
'default' => array('host' => 'localhost', 'db' => 'mydatabase')
);
$conf['mongodb_collections'] = array(
'watchdog' => 'mongohost',
'session' => 'mongohost',
'cache' => 'mongohost',
);
$conf['cache_inc'] = './sites/all/modules/mongodb/mongodb_cache/mongodb_cache.inc';
$conf['session_inc'] = './sites/all/modules/mongodb/mongodb_session/mongodb_session.inc';
Comment #2
chx commented