#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2011
    Posts
    29
    Rep Power
    0

    Stop Mysql BackUp .sql file double clicking open!!


    Hey......

    I m using ubuntu as my OS..when i get a mysql backup(db.sql) file i can open .sql file by double clicking..It is not a good thing..someboddy can change it and restore it !!..

    Also i m using java..

    Please give me solution to stop .sql file open by double click.
  2. #2
  3. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,316
    Rep Power
    7171
    You can't. A .sql file is just a text file.

    If you don't want someone to be able to read a file, encrypt it.
    PHP FAQ

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2011
    Posts
    29
    Rep Power
    0
    Originally Posted by E-Oreo
    You can't. A .sql file is just a text file.

    If you don't want someone to be able to read a file, encrypt it.
    how to encrypt A.sql while backup is processing....

    Process runtimeProcess = Runtime.getRuntime().exec("/usr/bin/mysqldump -u root -p123 easybanker -r /home/mmh/BackUp/"+BackUpName);

IMN logo majestic logo threadwatch logo seochat tools logo