select * INTO OUTFILE '/tmp/result.txt' FIELDS TERMINATED BY ',' LINES TERMINATED BY '/n' from ancestor;

So I run this command, and it executes normally. I run it again, and it errors because it says that result.txt already exists. When I check within the tmp folder on my computer, I don't see the file there. I have seen many people run into similar errors, and many people's responses have been that it gets saved on the host server. And it does! Which is fine. But here is the thing. I need it to save on my client computer. How do I make it so it works on the client? Also, the client is running mac os x. Also, the person who uses the client uses workbench and would prefer not to use terminal. Because I know there is the -e command for terminal but I don't know how to replicate that on workbench.

有帮助吗?

解决方案 2

So I feel like a fool, but there is an export button in mySQL workbench that allows you to export the result of any query. This avoids the whole issue I've been having. Sorry to trouble you guys. Thanks for all of your help!

其他提示

On Mac OSX, files in the /tmp directory are hidden in the finder.

You could try this to show hidden files in the finder.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top