0

I need to install drupal multi-site with shared database but just need to create some tables specific to that site like, users table should be different for sub-sites.

I know about full sharing or full different database for different sites, but I need partial different database. I searched for it on google but didn't get exact solution so posting it here if anybody has clue about?

2

You can try editing you sub-sites settings.php file and you just need to provide different prefix for user table (as you need only this table different).

I am providing sample here so that you can implement and see if it works.

$databases = array (
  'default' => 
  array (
    'default' => 
    array (
      'database' => 'drupal',
      'username' => 'root',
      'password' => '',
      'host' => 'localhost',
      'port' => '',
      'driver' => 'mysql',
      'prefix' => array(
           'users'     => 'abcsite_',
      ),
    ),
  ),
);

The above code will tell your installation to use abcsite_users (you need to create table first with same structure as of default users table) for entering user details.

  • 1
    I am able to share user fields.But how do I share user profile fields? – NewToDrupal Sep 16 '14 at 9:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.