URGENT: simple quick script to synchronize several mysql tables

  • สถานะ: Closed
  • รางวัล: $10
  • ผลงานที่ได้รับ: 1
  • ผู้ชนะ: brnopcman

รายละเอียดการประกวด

I need this URGENTLY to help debug and fix a problem I'm having.

I need a simple script which will do the following (pseudo-code):

READ from configuration file, the host, port, user, password of two mysql servers: SERVER1 and SERVER2.
For each DATABASE in SERVER1, repeat:
For each TABLENAME in SERVER1.DATABASE, repeat:
Let T1 represent TABLENAME in SERVER1.DATABASE and T2 represent TABLENAME in SERVER2.DATABASE.
Get the name of the auto_increment primary key column of T1 (if none defined, skip to next table).
Select the MAX(primary key "PK" value) from T1 and T2
For each ROW in T1 that has a PK value larger than MAX(T2.PK), copy the row from T1 to T2.
Compare the COUNT(*) from T1 and T2, and if they don't match, print a warning.
Done
Done
; end of pseudo-code

In the public phase of the contest, please upload screen shots showing your test procedure and test results. The code will be uploaded only if you are selected as the winner. THE CONTEST MAY BE ENDED EARLY IF A SATISFACTORY SUBMISSION IS RECEIVED.

ทักษะแนะนำ

คำติชมจากผู้ว่าจ้าง

“@brnopcman won the contest on 11 April 2015”

รูปประจำตัว afterhourstech, United States.

กระดานประกาศ

  • minhanoi
    minhanoi
    • 9 ปี ที่ผ่านมา

    Do you accept NodeJS script?

    • 9 ปี ที่ผ่านมา

วิธีเริ่มต้นจัดการประกวด

  • ประกาศการประกวดของคุณ

    จัดการประกวดของคุณ รวดเร็วและง่ายดาย

  • รอรับผลงานจำนวนมหาศาล

    รอรับผลงานจำนวนมหาศาล จากทั่วโลก

  • มอบรางวัลให้แก่ผลงานที่ดีที่สุด

    มอบรางวัลให้แก่ผลงานที่ดีที่สุด ดาวน์โหลดไฟล์ - ง่ายดาย!

โพสต์การประกวดตอนนี้เลย หรือเข้าร่วมกับเราวันนี้!