needs an indication on where to find the file (local or otherwise)
http://dev.mysql.com/doc/refman/5.1/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.7.3, "Privileges Provided by MySQL".

Using LOCAL is a bit slower than letting the server access the files directly, because the contents of the file must be sent over the connection by the client to the server. On the other hand, you do not need the FILE privilege to load local files.

LOCAL works only if your server and your client both have been enabled to allow it. For example, if mysqld was started with --local-infile=0, LOCAL does not work. See Section 5.6.4, "Security Issues with LOAD DATA LOCAL".

restart mysql server with local-infile=1 option
then local loads should work

http://dev.mysql.com/doc/refman/5.1/en/privileges-options.html


Also make sure you have FILE privilege grant for the userrname

mysql>SHOW GRANTS FOR username

M--

This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

----- Original Message ----- From: "Gordon" <[EMAIL PROTECTED]>
To: <mysql@lists.mysql.com>
Sent: Tuesday, June 19, 2007 12:05 PM
Subject: used command isn not allowed


I tried running this load data command on Server version: 5.0.27 and get the
1148 error. I'm not sure if it is referring tho the comand client or the
server.

I also do not understand why the command {or which part} it is complaining
about. Probably something obvious, but I just can't see it.



Any suggestion will bew greatly appreciated.



mysql> load data local infile "c:\\losalamos.asc" into table losalamos_new

   ->        fields terminated by ',' optionally enclosed by '"' lines
terminated by '\r\n' ignore 1 lines

   ->        (`FIRSTOWNER`, `OWNER2`, `NFUL_ADDR`, `NFUL_ADDR2`, `CITY`,
`STATE`, `ZIPCODE`, `FIRST_NAME`,

   ->         `LOT`, `BLCK`, `TRACT`, `SUBD`, `SECTION`, `TOWNSHIP`,
`RANGE`, `DESCRIPT`, `LAST_NAME`, `TAXAMT`,

   ->         `MAPCODE`, `NUMBER`, `STREET`, `YBLT`, `MAIN`, `SECOND`,
`THIRD`, `DOWNSTAIRS`, `TOTAL`, `DEAR`,

   ->         `TRUST`, `CTYSTZIP`, `ACCT`, `ACRE`, `DEEDBOOK`, `DEEDPAGE`,
`TAXDUE`, `TAXPAID`, `PUR_DATE`,

   ->         `PROP_ZIP`, `COMPANY`, `SALUTATION`, `CONTACT`, `BEDROOMS`,
`BATHS`, `TAXYEAR`, `UNITS`, `SALEDATE`,

   ->         `ACCTTYPE`, `LANDASD`, `IMPASD`, `cntyname`, `SALEMONTH`,
`SALEYR`);

ERROR 1148 (42000): The used command is not allowed with this MySQL version




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

Reply via email to