menembus batas impian


private void button1ActionPerformed(java.awt.event.ActionEvent evt) {

try {
String bul=(now.getText()).substring(2, 8);
String driveku2=driveku.getText();
String driveku21=drivekumysql.getText();
String ff=”/media/nk/”+bul;
File filew = new File(ff);
filew.mkdirs();
String host=”localhost”,user=”root”,pw=”nk”;

String file=”/media/nk/”+bul+”/sys”+now.getText()+”.sql”;
File test=new File(file);
FileWriter fw=null;
try{
System.out.println(“cek”);
fw = new FileWriter(test);
Runtime rt = Runtime.getRuntime();
Process child = rt.exec(“/usr/bin/mysqldump  -h”+host+” -u”+user+” -p”+pw+” datasysbmt “);
InputStream in = child.getInputStream();
InputStreamReader xx = new InputStreamReader(in,”latin1”);
char[] chars=new char[1024];
int ibyte=0;
while((ibyte=xx.read(chars))>0)
{
fw.write(chars);
}
fw.close();
}catch (Exception e) {

e.printStackTrace();
}

}

untuk restore nya masih belum berhasil.. ntar kalo udah berhasil br di upload.. trims semoga bermanfaat buat kita amiin.

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

%d blogger menyukai ini: