Manual talk:$wgSharedDB

That's a useful setting! But the project's tables might have a prefix!

For instance, I would like to have two projects in the same database with a single sign-on and I have to use prefixes for both of them (because my provider gave me only one database, and I have other tables in it) -- how can I configure MediaWiki for that?
 * I have a similar problem. I have a project with multilingual system, but I want to permit only-one-register for all users (you register on commons project and have access for all other wikis installed in the same domain/server) Could anybody help us? Thanks - estemon


 * If all wikis are set to use the same cookie domain, a user shouldn't have to login separately. Jschroe 17:39, 19 July 2007 (UTC)

preselected db-users
Hello! My provider gave me two preselected databases and preselected users. I've got a german wiki about a dialect. Let's say that the first database's name is "mainwiki" - this is the database for the image-pool - than the second's name is "mainwiki_ma". The user names are then:
 * for database "mainwiki": "mainwiki"
 * for database "mainwiki_ma": "mainwiki_ma"

I can't change this, so $wgSharedDB doesn't work for me, because the current db-user needs readaccess to the shared database, but this isn't possible. What can I do, that this works? Please help!

I need an example
I am sorry that I need an example to follow. My project have 3 languages so I set up 3 wikis. I want to have single user registration. The configuration details are:

wikiName / database / databaseUser / tablePrefix 1. cnwiki / cnwiki / wpc / wpc_ 2. enwiki / enwiki / wpc / wpc_ 3. hkwiki / hkwiki / wpc / wpc_

Since hkwiki will be the most popular one, I would like to make it the shared database.

LocalSettings.php for cnwiki //SharedDB $wgSharedDB = 'hkwiki'; $wgSharedTables = array( 'user', 'user_groups', 'interwiki'); $wgSharedPrefix = 'wpc_';

LocalSettings.php for enwiki //SharedDB $wgSharedDB = 'hkwiki'; $wgSharedTables = array( 'user', 'user_groups', 'interwiki'); $wgSharedPrefix = 'wpc_';

LocalSettings.php for hkwiki //SharedDB $wgSharedDB = 'hkwiki'; $wgSharedTables = array( 'user', 'user_groups', 'interwiki'); $wgSharedPrefix = 'wpc_';

Then I have error message when I created an user. Can anyone help to correct my settings? Many thanks!