I have a MySQL server running on one PC (WinXP).
On another PC (WinXP), I’d like to backup tables to csv files so I have a c++ program connect to the MySQL database and then I issue a command like this:
SELECT data FROM table WHERE something=ABC
INTO OUTFILE c\tmp.txt
FIELDS TERMINATED BY ';'
OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY ";";
the data seems to get exported but on the Servers “c:\” not on my PC:s “c:\”.
I can’t just fetch the data over the LAN either as my program is running as a windows service.
I have seen this post but it seems I can’t use “FIELDS TERMINATED BY” etc. with that solution.
Can I export csv data locally from a distant server or do I have to migrate the data locally first?
Problem “solved” : As it seems you can’t do it in a ‘simple’ way, I run the service on the PC with MySQL and have a DCom server periodically move the data to the other PC.
Intended to be a comment (but I don’t have enough rep points to comment). Not sure if you are able to install things, but you could try using cygwin + sqsh (http://www.sqsh.org/sqsh_home.html). I’m a linux user and sqsh is a great tool for grabbing data from databases.