Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2009
    Posts
    88
    Rep Power
    0

    Default run mysqldump command

    how to execute mysqldump command in java desktop application plz...
    help.

  2. #2
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

  3. #3
    Join Date
    Oct 2009
    Posts
    88
    Rep Power
    0

    Default

    I know to execute it with Runtime.exec(), but it ask path of mysqldump.exe, and it is dependent os installed drive, but i need to run the command independent of password for mysqldump using Runtime.exec()

  4. #4
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    8

    Default

    It's not dependent on OS installed drive but on where the mysqldump.exe program is located. You can't run the command if you don't know where that program is unless if it's already on the PATH. Why do you want it to be run without specifying the password? Are you trying to steal someone's database?

  5. #5
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default

    Quote Originally Posted by anilkumar_vist View Post
    I know to execute it with Runtime.exec(),
    That doesn't mean you know how to do it correctly (which is what the earlier article is for, read it). And, if you know how to execute it, then why didi you ask how to execute it? You need to be a bit more specific in your questions.

    but it ask path of mysqldump.exe,
    Well, if it's not on the path, of course. Use a properties file or something to designate the full path.

    and it is dependent os installed drive,
    No, regardless of the OS the arguments to mysqldump are the same. The path may be different, but for that, see above.

    but i need to run the command independent of password for mysqldump using Runtime.exec()
    You can't, unless you create a user without a password with access to the dbs/tables you need. Not a good idea.

Similar Threads

  1. MYSQLDUMP from Java
    By Robert_85 in forum Advanced Java
    Replies: 6
    Last Post: 11-18-2009, 04:33 PM
  2. Does the JRE come with command to run?
    By gotenks05 in forum New To Java
    Replies: 5
    Last Post: 10-25-2008, 01:00 AM
  3. command
    By dirtycash in forum New To Java
    Replies: 8
    Last Post: 01-02-2008, 08:52 PM
  4. command help
    By dirtycash in forum New To Java
    Replies: 1
    Last Post: 12-05-2007, 01:24 AM
  5. Unable to execute command line command in java
    By LordSM in forum New To Java
    Replies: 1
    Last Post: 08-08-2007, 01:23 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •