Multiple sites with one user db

I have two sites running from the same Drupal4.7 instance as explained in install.txt.

These two sites have seperate databases but share users. I did this
by editing $db_prefix in the slave site's settings.php. As explained at
http://drupal.org/node/22268.

I got errors like "Duplicate entry.." when trying to create a new user. As if the sequences table was not being shared.

The difficulty came in not recognizing that the $db_prefix in the master site's settings.php must also be edited.

The $db_prefix variable is carried into the sequences table. So,
even though I was using the same sequences table for both databases,
Drupal was making seperate entries for each site using the prefix as
part of the "name" column.

Solution:

Settings.php for the slave site should have this -

$db_url = 'mysql://user:pass@host/slave';
$db_prefix = array(
"default" => "slave.",
"users" => "master.",
"sessions" => "master.",
"authmap" => "master.",
"sequences" => "master.",
"profile_fields" => "master.",
"profile_values" => "master.",
"role" => "master.",
"user_roles" => "master.",
);

Settings.php for the master site should have this -

$db_url = 'mysql://user:pass@host/master';
$db_prefix = array(
"default" => "master.",
);