I posted the same question two weeks ago. The only suggestion was to add flags to the my.cnf file:

[mysqld]
local-infile=1

[mysql]
local-infile=1

But this didn't work.

I've tried using the flags on startup of MySQL as shown in the manual but this fails as well.

We were running 3.23.49.

I then upgraded to 3.23.54a which appears to have the command turned on when compiled - the configure line says --enable load data local - but it doesn't work for this version either (on my system).

I wrote a work around script to allow upload of the file through a form on the web server and then ftp it to my database server. I can then use LOAD DATA without the local to insert the data. This works but you have to have the correct permissions set on the directory that the file is FTP'd into. So if you can get the file to the correct server then just avoid the local part of the clause and give the path to the file while running the command line or SQL. Of course this approach recreates the security hole but my scripts are all behind login pages anyway.

Not much help I know, but you are not the only person having this problem.

Jon Bertsch

At 09:38 PM 1/3/2003 +0100, you wrote:
Hi,

(I posted this question once before in a Re: that everyone seems to have
missed ;-)

I use 4.0.7-max-nt on a Win2K box, and whatever I do, I cannot use LOAD
DATA LOCAL (keep getting error 1148). I tried:

- Starting the server with --local-infile=1, and with --local-infile.
- Starting the mysql client with --local-infile[=1]
- Combining server and client options

The manual page on this is quite contradictory.

I agree with the user comment on that manual page:

I just wasted 3 hours of my time tracking down this
annoying security "improvement" -- thanks but no
thanks, MySQL developers. This was poorly thought
out and poorly implemented.

Any hints how to make LOAD DATA LOCAL work in spite of this
"improvement"?

Regards,
--
Stefan Hinz <[EMAIL PROTECTED]>
Geschäftsführer / CEO iConnect GmbH <http://iConnect.de>
Heesestr. 6, 12169 Berlin (Germany)
Tel: +49 30 7970948-0 Fax: +49 30 7970948-3



---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

---------------------------------------------------------------------
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to