开发者

Connecting to another mysql database and update database tables when other database is update

开发者 https://www.devze.com 2023-01-25 23:08 出处:网络
Is it possible to connecting a remote mysql server and auto update another database in the same time?

Is it possible to connecting a remote mysql server and auto update another database in the same time? For example my database:

Database one: user id  user name  pass

When adding or updating user in database two, user name in database one updates. How can I do this if possib开发者_如何学Pythonle? Thanks in advance


Automating this inside mySQL may be possible using triggers but that is complex and requires mySQL 5.

Wouldn't it be an option to do the logic in PHP? Adding a query to update database B whenever database A is updated?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号