LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   Need to compare 2 tables data from different linux servers with mysql using perl script (http://www.linuxquestions.org/questions/programming-9/need-to-compare-2-tables-data-from-different-linux-servers-with-mysql-using-perl-script-4175431594/)

tarun28jain 10-11-2012 01:29 AM

Need to compare 2 tables data from different linux servers with mysql using perl script
 
I am having 2 Mysql servers installed on 2 servers.
They have same table in same database with some different records.
I need to compare data of these tables and generate logs.
Similar to MYSQL_DIFF generates logs comparing schemas, i need comparing logs of table data. i am not able to find any appropriate solution to this. Apart from writing the complete logic for doing this, is there any solution to do this using MYSQL_DIFF type of libraries.

zhjim 10-11-2012 01:53 AM

http://stackoverflow.com/questions/2...ysql-diff-tool.

tarun28jain 10-11-2012 05:58 AM

I need a perl script written for it on RHEL command line platform. Also i need data to be comparedin those 2 tables. The link provided shows ways to compare data and schema using some softwares available as far as i understood. In case I misunderstood, could you please explain a bit.

Thanks for reply anyways

zhjim 10-16-2012 07:54 AM

I don't know in which languages the program are written. At least the programs included with maatkit which now can be found here http://www.percona.com/software/percona-toolkit run from command line. As far as I remeber they are either bash or perl scripts.

Does it really have to be perl? Or does it just need to be something that can be run from cmd?
I normaly just take a look at the available tools and then choose the best one on mostly "can it doe the job" and "do i understand the language (so i can tweak it myself)".


All times are GMT -5. The time now is 04:52 AM.