简体   繁体   中英

running multiple websites with different database but using same user database

Currently I am working working on a project with MySQL RDBMS which contains 5 sites having their own databases. 2 of them are in the same server and the rest of them in different one.

The 5 sites have different databases.

I need to make one more database containing only the user login and meta information and direct all 5 sites to that DB while loging in or registering.

Now, the challenge how to organize already registered users.

Users have different permissions set in their respective site. How do I maintain permission issues for all 5 site since 3 sites contain about 40 permission contents (catalog).

How do I set 40 permissions to all the users?

How can I synchronize all users from these 5 databases, on two different servers?

You can unite all the users in one database and move all access rules from all databases.

For example

Site1:
User11
User12
...
User1N

AccessRule11
AccessRule12
...
AccessRule1Q

SiteM:
UserM1
UserM2
...
UserMK

AccessRuleM1
AccessRuleM2
...
AccessRuleML


ResultBase:
User11
User12
...
User1N
UserM1
UserM2
...
UserMK

AccessRule11
AccessRule12
...
AccessRule1Q
AccessRuleM1
AccessRuleM2
...
AccessRuleML

Later you can normalize the rule set. There maybe the same access rules on different sites. They have to be united.

I'm not sure if it will help you but i will post it. mysql replication

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM