If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > execute sql script from mysql command prompt

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-02-05, 02:12
ramvs ramvs is offline
Registered User
 
Join Date: Jun 2005
Posts: 23
execute sql script from mysql command prompt

hello everyone
i would like to execute a .sql file located at d:\ say gh.sql from my
mysql command line prompt window.

Also i would like to know how to produce a xml or html output if i query a
table in mysql.For eg say there is a 'person' table in mysql containing name,
age,address etc is it possible to redirect the output to a xml or html file if
i query the person table using a select statement from mysql command line


please give examples,
Reply With Quote
  #2 (permalink)  
Old 11-02-05, 04:47
Chagh Chagh is offline
Registered User
 
Join Date: May 2005
Posts: 127
hi
for the first one, use source. see source in MySQL Docs for more info and examples.
and for the second you should use -X option of mysqld, see mysql-command-options

Chagh
Reply With Quote
  #3 (permalink)  
Old 11-02-05, 04:53
ramvs ramvs is offline
Registered User
 
Join Date: Jun 2005
Posts: 23
thanks chagh for your reply i am using mysql 4.1.14 and i would like some
examples to illustrate the concept ,as the documentation has no examples.the docs simply say --xml produce xml output or --html produce html output
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On