Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
select last, email from address where email <> "";
This brings back the results as expected BUT I want the results to be piped to a .txt file.
I tried select last, email from address where email <> "" > /home/diamond/test.txt;
select last, email from address where email <> "" | /home/diamond/test.txt;
both end with same result:-
ERROR 1064: You have an error in your SQL syntax near '/home/diamond/test.txt' at
line 1
As I see from my new sql cookbook, page 30 Creating a tee file........introduced in MySQL 3.23.28, the Zaurus version is 3.22 that I have.
Does anyone know how to log interactive mysql sessions on a Zaurus to a text file like I have learnt to do on my desktop mavhine with tee /home/spb/testing.txt......
Distribution: Red Hat, Fedora, Yellow Dog, Debian, FreeBSD, Embedix
Posts: 106
Rep:
Quote:
Originally posted by buttersoft Does anyone know how to log interactive mysql sessions on a Zaurus to a text file like I have learnt to do on my desktop mavhine with tee /home/spb/testing.txt......
All your commands in mysql client are logged in ~/.mysql_history
My guess is that you were unable to select into outfile, because you were trying to write the outfile to a directory in which your MySQL server has no permission to write, e.g. your home directory. When you select into outfile, it is the server, not your client that writes the file. Whoever it runs as (daemon on my Z) has to be able to write to whereever you're trying to create your file. On my Z, when I entered just the file name, witout the path, outfile got created just fine in the /home/system/var/lib/mysql/mysql/ directory, which is probably not the best place to write files to...
Try writing to /tmp/outfile.txt The /tmp directory is supposed to be world-writable, although it is quite small on the Z
Well I found out on the Z I can use copy and paste into a text file! That was all I needed the first time.......will investigate what you say about /tmp
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.