Thread:Project:Support desk/Wikifamily and Shared database setup/reply (3)

$wgSharedDB would do the trick. Use $wgSharedPrefix only if it's different from $wgDBprefix

I'm not sure if $wgCookieDomain will work with ".mainwiki.com". I think it should be "mainwiki.com"