Hi All,
I have two data bases , one is resides in production site and which is mysql , I want to syncronize this data base table data(only data ) to a data base which is not used in live environment and use for report module(DBR). The data sync should be realtime and its only changed data should be propagete to the DBR database. DDL functions not required to carring out in the DBR data base.
I am new to PHP but have worked with mysql , i am looking forward some help for a php script.
Thanks a lot any help welcome,
Table(s) data sync PHP+MYSQL
Moderator: General Moderators
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: Table(s) data sync PHP+MYSQL
Find out what database extension you have available and then check the manual. It is really just SQL once you know which library to call.
Also, you might want to look into MySQL replication instead.
Also, you might want to look into MySQL replication instead.
(#10850)
Re: Table(s) data sync PHP+MYSQL
Thanks Christopher for quick response,
It is all mysql i have to start, i am looking for som php code help to identify data differences in given tables and insert/update/delete to second database tables,
Mysql replication is not posible here the first data base is not possible to change the configurations to support replication.
Thanks a lot
It is all mysql i have to start, i am looking for som php code help to identify data differences in given tables and insert/update/delete to second database tables,
Mysql replication is not posible here the first data base is not possible to change the configurations to support replication.
Thanks a lot
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: Table(s) data sync PHP+MYSQL
To compare the data in two different databases you need to SELECT the data and use PHP to compare the fields. You may want to have your application always write to both databases to they both have the same values.
(#10850)
Re: Table(s) data sync PHP+MYSQL
If you require two different databases on separate platforms to remain in sync (in real-time) you'll need to ensure that they are modified together. You can accomplish this through the use of XML requests, with parsers on each side.
Re: Table(s) data sync PHP+MYSQL
Not exactly in PHP, but does what you want: http://www.maatkit.org/doc/mk-table-sync.html
Re: Table(s) data sync PHP+MYSQL
Weirdan,benjamin,Christopher,Thanks for your valuable posts , i am looking for a solution like maatkit.
i am looking it and believe that i can find a solution to it.
Thanks a lot
i am looking it and believe that i can find a solution to it.
Thanks a lot