With LOCAL, the *client* reads the file on the client's machine. Without LOCAL, the *server* reeads the file on the server's machine. Even though the client and server machines are the same in your case, those are still different operations. There are restrictions on having the server do the work, for good reason. This is documented in the manual <http://dev.mysql.com/doc/mysql/en/LOAD_DATA.html>:

: For security reasons, when reading text files located on the server, the
: files must either reside in the database directory or be readable by all.
: Also, to use LOAD DATA INFILE on server files, you must have the FILE
: privilege. See section 5.5.3 Privileges Provided by MySQL.

Michael


Patrick Connolly wrote:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 5 to server version: 4.0.18-standard

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> mysql> LOAD DATA INFILE "Orders.txt" INTO TABLE Orders3 fields terminated by '\t';
ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password: NO)


Even thought the server is on the same machine as the host, I always
get this error message if I try .

If I add the word LOCAL, it is quite happy even though I know it
shouldn't be necessary.

That hasn't bothered me very much, but now I'm working on Chapter 9 of
the Certification Study Guide which covers this topic, and the related
SELECT INTO OUTFILE, I don't have a work around.


I'm using Redhat 7.3 with the mysql RPMs from the MySQL site, not the
ones that came with the distro.  So far, everything else seems to work
"properly", but I'm mystified why this should happen.

Somehow, I doubt that anyone will be able to replicate this problem,
so that makes it unlikely anyone will have an answer, but one can't be
sure.....  At one stage I thought it might be an obscure hardware
difficulty with this aged machine (over 5 years) because of another
obscure problem I had using fetchmail from a POP server.  However, I
noticed that once I switched off the ISP's virus checking, that
problem vanished, so I'm less inclined to believe it's hardware.

Any wild guesses welcome.

TIA



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to