Skip navigation links

MySQL Forums :: Newbie :: Load data Infile - is not allowed in this MySQL version


Advanced Search

Load data Infile - is not allowed in this MySQL version
Posted by: Chris Kieff ()
Date: September 29, 2004 06:58AM

Hello,

MySQL newbie here, but with some db experience. Using my ISP's set up running on their host. created a database, and a table now can't get the data into the table.

I'm using their myPHPAdmin and I choose this option: "Insert data from a textfile into table"
I have successfully entered data manually and I can retrieve and view it. So the table and the db do function.

Since I didn't compile or set any parameters when I created the db I think the permissions should be set up correctly. AssUme-ing the ISP set the scripts up properly--have a trouble ticket into them to check.

I BROWSE (my harddisk on my client) to my file and select REPLACE and change the delimiter to "," and I get the following error:
(Note: I've also uploaded the file and tried it with the complete path on the host. I've tried .txt instead of .csv and varied all of the options till I'm blue in the face. I'm missing something basic but don't know what.)

Database treecity_memberlist - Table members running on localhost

Error

SQL-query :

LOAD DATA LOCAL INFILE '/tmp/phptlzpqk' REPLACE INTO TABLE `members`
FIELDS TERMINATED BY ','
OPTIONALLY ENCLOSED BY '"'
ESCAPED BY '\\'
LINES TERMINATED BY '\r\n'

MySQL said:
#1148 - The used command is not allowed with this MySQL version


This is the text from the screen that generates the SQL which results in the error: (I assume this is the standard screen for this function in myPHPAdmin.)

Database treecity_memberlist - Table members running on localhost
Structure Browse SQL Search Insert Export Operations Empty Drop

Location of the textfile (Max: 2,048KB)
Replace table data with file Replace The contents of the file replaces the contents of the selected table for rows with identical primary or unique key.
Fields terminated by The terminator of the fields.
Fields enclosed by OPTIONALLY Often quotation marks. OPTIONALLY means that only char and varchar fields are enclosed by the "enclosed by"-character.
Fields escaped by Optional. Controls how to write or read special characters.
Lines terminated by Carriage return: \r
Linefeed: \n
Column names If you wish to load only some of a table's columns, specify a comma separated field list.
LOAD method ...DATA
...DATA LOCAL The best method is checked by default, but you can change if it fails.
[Documentation]

Thanks,
Chris


Options: ReplyQuote


Subject Written By Posted
Load data Infile - is not allowed in this MySQL version Chris Kieff 09/29/2004 06:58AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.