Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2004

    Unanswered: Executing command line stuff from a Web App

    I have a book which gives various tips regarding MySQL some of which include issuing queries from the command prompt.

    %mysql -X -e "select * from myTable" myDatabase

    This query for instance outputs a result as XML rather than in table format.
    My question is how would I use something like this, a query that is designed for executing via the command prompt, from a Web Application?

    Someone in another forum suggested using the system() function but I am unable to find any mention of this function on any MySQL related websites.

    The sorts of things that may be useful to be able to execute from a web page are instructions like:

    %mysqldump myDatabase states > dump.txt

    This might enable me to click a button in a web page and execute the instruction.

    Any help is appreciated.


  2. #2
    Join Date
    Aug 2003
    Reston, VA

    Command Line...


    my first question would be what you are writing your web application in? Most server-side programming gives you the ability to execute command line utilities/programs...For instance, PHP has the 'exec()' and 'shell_exec()' functions...Perl has it's own and I'm sure ASP, JSP, etc all have their own. You would not find this documentation in MySQL rather the web programming language you chose to write your web application.

    The above being said, many of the mysql functions are built in directly in native functions of that programming language for connectiong/disconnection, selecting dbs, writing/executing queries....Here is the PHP documentation, but again, this depends on what you chose to write your web application in....

    Happy Trails!

  3. #3
    Join Date
    Jun 2004
    Thanks for your reply. I'm writing it in ASP so if anyone else has any experience in this sort of thing using ASP i'd appreciate any help available.

    Thanks in advance


Posting Permissions

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