sadiq_segaraga Publish time 19-7-2012 09:53 AM

Sync 2 Mysql database berlainan server

Sejahtera atas kamu

Boleh tak bagi sikit advise/idea bagaimana nak syncronisekan 2 mysql database (nama dan table semua sama) dari 2 server yang berlainan (1 kat local aja -intranet) dan 1 lagi kat luar (guna host free).

Yang intranet tu, untuk staff access dan key-in data sementara yang kat luar (free) tu untuk student key-in info masing masing. Yang server local tu management atasan tak kasi bukak untuk luar.

BorderManager Publish time 19-7-2012 10:21 AM

try google MySQL replication

tapi kedua2 ko kena ada root access nak set master & slave

sadiq_segaraga Publish time 19-7-2012 10:33 AM

Reply 2# BorderManager


Dah check gak tapi rasanya macam tak boleh sebab replication akan guna port Mysql yang mana port untuk Mysql for local tak dibuka untuk keluar dan port dari luar tu pula tak dibenarkan masuk oleh firewall yang dikawal oleh system admin pusat - tu yang leceh kerja kat branch ni.. semua kena ikut kepala orang kat HQ.

So nak cari cara yang guna web based yang menggunakan semata mata port 80 untuk aliran keluar masuk.

BorderManager Publish time 19-7-2012 11:44 AM

kalau sebagai backup boleh la...
kalau utk sync rasanya kena guna replication

sadiq_segaraga Publish time 19-7-2012 11:59 AM

OK.. thanks.

Katalah kita dah backup data dari server yang kat luar tu.. kemudian OFF kan sementara access data dari public untuk server luar tu, pastu camna nak synckan supaya 2-2 database mempunyai data yang sama?

alam. Publish time 19-7-2012 11:51 PM

OK.. thanks.

Katalah kita dah backup data dari server yang kat luar tu.. kemudian OFF kan sementa ...
sadiq_segaraga Post at 19-7-2012 11:59 http://mforum2.cari.com.my/images/common/back.gif


   
      1]Cadangkan lh pada HQ utk open port
2]kalo xbleh .. di cadangkan wat 3rd application...contoh microsoft platform application windows console atau windows services yg ada function get dan retrieve data.. contoh

dim nowHour as integer = 0
Sub Main()
If nowHour <> (Now.Hour) Then
            nowHoure = Now.Hour
             Console.Write("Application Started")
         sqlstring = "select * from table1"
            'executequery(sqlstring) --> function
         'if data return = true then Insert or update -->action
      End If
       System.Threading.Thread.Sleep(1500 * 25) 'milisecond
       Call Main()
End Sub

so dia akan running ikot duration yg kita set...

sadiq_segaraga Publish time 20-7-2012 08:56 AM

Reply 6# alam.

1. Memang susah nak suruh HQ bukak.. banyak kertas kerja kena buat pulak
2. Camna tu.. tak faham

oobi Publish time 20-7-2012 12:33 PM

Reply 3# sadiq_segaraga

there's a reason they do the way they do. that's what IT people call "care about security". so, if your top management or IT management doesn't want to open or you need to go through a lot of procedure to open up layers of security within your organization, that's good. so, don't complaint about the procedure in place. if your project is very important, you should not have problem getting approval to open necessary access to do what you want to do. otherwise, you're opening a hole within your organization for intruder.

having said that, i'm no expert in db but mysql should have config file somewhere and in there, there's probably a setting for port. try change that port from whatever mysql port to port 80. another way, set a static route on your mysql server to force all mysql traffics to use port 80. how? rajin-rajin baca and buat research. banyak ilmu kat internet.


oobi Publish time 20-7-2012 12:39 PM

Reply 1# sadiq_segaraga

by the way, based on your detail above, i don't recommend that you sync any servers on your LAN to any free host servers outside your organization. understand the word "free". you may just breach security protocol.


alam. Publish time 23-7-2012 11:05 PM

sadiq_segaraga posted on 20-7-2012 08:56 AM static/image/common/back.gif
Reply 6# alam.

1. Memang susah nak suruh HQ bukak.. banyak kertas kerja kena buat pulak


woahhhh... forum dah wajah baru... {:1_132:}


1]
rasanya boleh cadangkan kepada HQ utk open port
dengan cadangkan kepada dorang utk specify destination dan source IP..
so xde lh risk sgt...


2] Besa buat Windows Services /windows Console dalam .net VB x?
kalau tahu.. bleh tgk sample project kt sini http://www.mediafire.com/?ky9rxy2m8g61vfb
//cuma specify my sql connection string:port dan SQL Query
buat dan run kt server local..
//tp dr pemahaman kt atas tuh.. mcm server local tuh x di buka utk keluar ja.. kalau x dibuka mmg xboleh lah.. sekian

Pages: [1]
View full version: Sync 2 Mysql database berlainan server


ADVERTISEMENT