LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-10-2003, 01:31 AM   #1
saravanan1979
Member
 
Registered: Jan 2002
Posts: 163

Rep: Reputation: 30
Exporting MYSQL results into a external files


Hello,
Can anyone please tell me how to import the results of MYSQl query to a external file..I have tried

mysql> MYSQL query tee <external file>

but this does not work

Saravanan
 
Old 03-10-2003, 07:34 AM   #2
AltF4
Member
 
Registered: Sep 2002
Location: .at
Distribution: SuSE, Knoppix
Posts: 532

Rep: Reputation: 31
try this:

mysql <myquery.sql >results.log
 
Old 03-10-2003, 12:12 PM   #3
BenCarlisle
LQ Newbie
 
Registered: Feb 2003
Distribution: RH7,RH8,Slack
Posts: 29

Rep: Reputation: 15
Also, try using the -B switch for actual usable results. This will write out the data as a tab-delimited data file instead of drawing the columns and tables.

cheers
 
Old 03-10-2003, 11:14 PM   #4
saravanan1979
Member
 
Registered: Jan 2002
Posts: 163

Original Poster
Rep: Reputation: 30
All the above are fine but my requirement is to export the result f a mysql query into an external files say a text file or a Excel Sheet or a HTML file..I am able to import the query from an external file and execute them..using source <filename> but tee is not working for me..
 
Old 11-12-2003, 04:19 PM   #5
buttersoft
Member
 
Registered: Aug 2003
Distribution: Slackware
Posts: 178

Rep: Reputation: 30
mySQL redirecting query result to a .txt file!

Search for this in the software forum and your answer is found!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
MySQL results to html forms using PHP xemous Programming 3 08-15-2005 04:27 PM
installing mysql and php4 results in a conflict bshearer *BSD 3 04-29-2005 03:36 PM
PHP: changing row color showing mysql results emilioestevezz Programming 15 09-13-2004 07:27 PM
Exporting MySQL error when trying to Import to another database. strez4prez Linux - Software 0 05-28-2004 12:43 PM
defining an external smtp server for mailing results of chkroot cron job xfurious_mindx Linux - General 0 03-15-2004 10:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration