Multisite database prefixes problem

Hi,

I am having the following issue:

When I create my multisite, I have one database and I want to share some tables like users, sessions, etc. For some reason, the shared tables are only created for the shared_ prefix, and my second_site, but not mydefaultsite. But I want those table to be created for each site as well.

Another problem that I am facing is that even if I have the shared_users and secondsite_users, when I create an user in my default site, it does not appear for my seconsdite. And I need to share users.

This is what I have in settings.php for my default site;

$databases['default']['default'] = array(
  'driver' => 'mysql',
  'database' => 'name',
  'username' => 'username',
  'password' => 'pass',
  'host' => 'localhost',
  'port' => '3306',
  'namespace' => 'DrupalCoreDatabaseDrivermysql',
  'prefix' => array(
      'role' => 'shared_',
      'role_permission' => 'shared_',
      'users' => 'shared_',
      'sessions' => 'shared_',
      'authmap' => 'shared_',
      'default' => 'mydefaultsite_',
  ),
);

$databases['secondsite']['default'] = array(
  'driver' => 'mysql',
  'database' => 'name',
  'username' => 'username',
  'password' => 'pass',
  'host' => 'localhost',
  'port' => '3306',
  'namespace' => 'DrupalCoreDatabaseDrivermysql',
  'prefix' => 'secondsite_',

);

This is what I have for settings.php for my second site:

$databases['default']['default'] = array(
  'driver' => 'mysql',
  'database' => 'name',
  'username' => 'username',
  'password' => 'pass',
  'host' => 'localhost',
  'port' => '3306',
  'namespace' => 'DrupalCoreDatabaseDrivermysql',
  'prefix' => array(
      'role' => 'shared_',
      'role_permission' => 'shared_',
      'users' => 'shared_',
      'sessions' => 'shared_',
      'authmap' => 'shared_',
      'default' => 'mysecondsite_',
),

);

Thank you.

Drupal version: 


Source: https://www.drupal.org/taxonomy/term/1/feed