You just need to exchange tables between sites.
You can exchange specific tables (best done in logical groups) compared to Drupal 7 installations by adding something like this to the settings.php file:
$my_db_users = 'drupal_users.shared_'; $my_db_content = 'drupal_content.shared_'; $databases['default']['default'] = array( 'driver' => 'mysql', 'database' => 'defaultdatabase', 'username' => 'databaseuser', 'password' => 'databasepassword', 'host' => '127.0.0.1', 'port' => 3066, 'prefix' => array( 'default' => 'default_', 'users' => $my_db_users, 'sessions' => $my_db_users, 'role' => $my_db_users, 'authmap' => $my_db_users, 'node' => $my_db_content, 'node_revisions' => $my_db_content, 'node_type' => $my_db_content, ), 'collation' => 'utf8_general_ci', );
In the above example, we set variables that point to different databases for certain groups of tables. So, in the above example, we need three databases: defaultdatabase , drupal_users and drupal_content .
Then in the array we set the default table prefix 'default' => 'default_', and in it we say: โstore all tables, unless otherwise specified, in defaultdatabase and make their default table prefix _ โ. We also say: "Store all users, sessions, roles, and user role mappings (authmap) in the drupal_users database with the shared _ table prefix." And finally, we say: "Store all node types, nodes and their changes in the drupal_content database with the shared _ table prefix."
With great power comes great responsibility:
You completely enclose your installation if you do not store logical groups of tables.
What are logical table groups? Well, probably, any table with the node_ prefix in your current installation should probably be moved to a shared database. Most well-structured modules (e.g. node_access) will have their own table name prefixed with something logical. Based on your modules, make sure you keep the table groups in the right place (in the default database for site data or in another database for shared data.)
Add a little bling:
I did a similar installation where users and roles were separated, but NOT authmap. For what purpose?
Well, if you do, you can have the same users and groups through a large network of sites, giving users different permissions on different sites. On one site you can be an editor, but otherwise you would be an author.