MySQL Forums
Forum List  »  Newbie

How do i export a csv file?
Posted by: Martin McGlensey
Date: September 13, 2015 01:41PM

A simple task - export a csv file from a shell command in a Gambas project.

I've tried "SELECT * INTO OUTFILE '/home/XXX/Desktop/export.txt ...." that does not work. It cannot create or write to any other directory other than /var/lib/MySQL/databasename. Tried creating /usr/local/tmp. Set owner to MySQL. Still does not work. Same error.

Tried MySQL with the -e option. That fails. Same error.

Tried MySQL dump with all the -- options set to export a csv file. That failed as well. Same error.

All of the above were tried with MySQL workbench. Needles to say I do not have access to /var/lib/MySQL as a user. I do not want my users in there anyway.

So how can I get MySQL/MariaDB to export a csv file to a specific directory? There has got to be a SIMPLE way to do it. It's got to be simple because I'm not a great Linux mechanic.

All response are appreciated.

regards,
Marty

Options: ReplyQuote


Subject
Written By
Posted
How do i export a csv file?
September 13, 2015 01:41PM
September 13, 2015 05:59PM
September 14, 2015 12:25PM
September 16, 2015 04:53AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.