I have a user that is using workbench to connect to a Linux MySQL Server and would like to have the query results sent straight to a csv or text file on his computer. I know how to do it if I were on the Linux box, but not from workbench. I know you can get your results i workbench and export them, but I'd like to save the step. One of the problems is his result set is really large and workbench sometimes has memory errors.
Asked
Active
Viewed 84 times
2 Answers
0
I'm not sure about Workbench but could you use a simple proxy on the local machine.
When the result comes back just get the proxy to output to text/csv file and then relay it back to Workbench if you want.
Just a thought but would probably only worthwhile if the memory issue was going to be an ongoing problem.

jim
- 183
- 1
- 7
-
I'm not sure how to apply a "simple proxy" on the local machine? We are tunneling using ssh. – Sep 07 '12 at 17:52
0
select ... into outfile '<path>/file.csv'
should work. According to this link you will need to give the user 'FILE'
privilege. And ofcourse you need write permissions to the location where you are trying to create the file.
About the memory issue, maybe use the command line instead of Workbench?
-
That only works if you are connected to a local MySQL server. I am tunneling using ssh from a windows PC to a linux server. – Sep 07 '12 at 17:54