I have 2 databases
Database A — For Site A
Database B — For Site B
Both the Databases have same structure.
A table in these databases is User. What I want do to is that if a User get registered,edit his info,delete his account from site A then its impact show on Site B as well and vise verca.
Do I need to combine the two database using some MYSQL function or Do I run a php file using cron every second and put some code in the file which check it and do this(I dont think this is the right way). Any kind of Help will be highly appreciated.
P.S Its not a custom PHP work. I am using a CMS. I dont want to do this with all other tables of these database as both the site contain totally different data in other tables of their respective databases. They just share their users(may be you say it like a site network). I want to update user table and a User detail table.
Thanks
It sounds like you want replication. If you really need to write data on both A and B you need master-master replication and that is not an easy path to walk. Think carefully before you do it 😉
You could also check out Tungsten Replicator. It is open source and do some “almost replication” stuff that could suit your needs.