me,myself,english and programming..

Archive for August, 2011

Script to backup MySQL from server and dump to localhost

Tuesday, August 16th, 2011

As a programmer, you will always find a way how to automate your task right ? do you ?

Well, this is my script to get the latest copy of mysql database into my local pc.

@Echo off
echo [%date% %time%] Starting backup...
mysqldump -u root -h 192.168.1.80 -pmyrootpwd mysqldb > mysqldb.sql
echo [%date% %time%] Starting dump....
mysql -u root -h localhost -pmyrootpwd mysqldb < mysqldb.sql
echo [%date% %time%] done.
pause

Save it as a batch file and just double click to run it. Your output will be something like below.

backup-restore-batch

 

Thats all. Hope it helps.

Selamat Berpuasa.

Monday, August 1st, 2011

JΐK∂ SeLuRuƗƗ UMuR ∕̴ƖD∂L∂ƗƗ DoS∂ M∂K∂ T∂uB∂TL∂ƗƗ UB∂TnY∂, JΐK∂ H∂RT∂ ∕̴ƖD∂L∂ƗƗ R∂CuN M∂K∂ Z∂K∂TL∂ƗƗ PeN∂W∂RnY∂, D∂N JΐK∂ SeLuRuƗƗ BuL∂N ∕̴ƖD∂L∂ƗƗ NoD∂ M∂K∂ R∂M∂DƗƗ∂NLaH PeMuTΐƗƗnY∂…

D∂L∂M KeSeMP∂T∂N ΐnΐ S∂Y∂ MeMoƗƗoN SeRΐBu KeM∂∂F∂N JΐK∂ KeTerL∂nJuR∂N K∂T∂, PeNuLΐS∂N D∂n PerL∂Ku∂N SeL∂M∂ PerKeN∂L∂N KΐT∂ SeL∂M∂ ΐNΐ…

SeMoG∂ R∂M∂DƗƗ∂N T∂HuN ΐnΐ ∕̴ƖK∂N MeMBeRΐ SΐN∂R PeRuB∂ƗƗ∂N P∂D∂ DΐRΐ D∂N JΐW∂ KΐT∂ SeMu∂ DenG∂N MeN∂MB∂ƗƗ KeΐM∂N∂N D∂N KeT∂KW∂∂N
D∂L∂M MenJ∂L∂nK∂N ΐB∂D∂ƗƗ Pu∂S∂.

S∂L∂M R∂M∂DƗƗ∂N ∕̴ƖL-MuB∂R∂K D∂Rΐ S∂Y∂.

-AreJae-