$wgSharedDB (shared user tables) is a low-effort single-sign-on mechanism that isn't very reliable - some parts of the code support it, some don't. (See e.g. T18794, T299766, T214011, T337185, T104830, T389758.) It's also possible to redeclare the set of tables that get shared via $wgSharedTables, which seems like a majestically bad idea, and depending on the exact tables might work, break slightly or break horribly.
We should deprecate and remove this feature, and - if feasible - replace it with something more maintainable:
- virtual domains
- an extension to cover the common use case of sharing users between wikis on a farm (probably via T359116: Split up CentralAuth into smaller extensions)
- or maybe just remove without replacement, although that would leave third-party users without a good way to run a wiki farm without outsourcing login somehow.