"select * from abc into outfile" local file (not
Posted: 31.08.2006, 22:15
Dear Friends
I am using MySQL and am able to issue the following:
select * from `setup_new` into outfile "c:\_setup.txt"
The server is remote and the text file is on the server (somewhere).
How do I type the path so that the resulting file is on my PC, not on the remote server?
If I use mysqldump the file is created locally,
why can't I do this from within my application? or Rather How can I do the same from within my app with Zeos.
I find that I can use the mysql.exe
c:\mysql\bin\mysql.exe -B -C --database=databasename --verbose --delimiter=, -f -remoteserver --column-names -ppassword -P3306 --protocol=tcp -uusername --connect_timeout=100 -e"select * from `setup_new`" > c:\_setup.txt
With this method I am able to achieve what I need but I do have to execute this from the DOS command line using a batch file, and find this a drag.
When I am able to find the file locally, I will then
LOAD DATA LOCAL INFILE "c:\_setup.txt" INTO TABLE `setup_new`
If somebody out there can help, i would be very grateful.
Regards
M.Parak
Durban South Africa
I am using MySQL and am able to issue the following:
select * from `setup_new` into outfile "c:\_setup.txt"
The server is remote and the text file is on the server (somewhere).
How do I type the path so that the resulting file is on my PC, not on the remote server?
If I use mysqldump the file is created locally,
why can't I do this from within my application? or Rather How can I do the same from within my app with Zeos.
I find that I can use the mysql.exe
c:\mysql\bin\mysql.exe -B -C --database=databasename --verbose --delimiter=, -f -remoteserver --column-names -ppassword -P3306 --protocol=tcp -uusername --connect_timeout=100 -e"select * from `setup_new`" > c:\_setup.txt
With this method I am able to achieve what I need but I do have to execute this from the DOS command line using a batch file, and find this a drag.
When I am able to find the file locally, I will then
LOAD DATA LOCAL INFILE "c:\_setup.txt" INTO TABLE `setup_new`
If somebody out there can help, i would be very grateful.
Regards
M.Parak
Durban South Africa