Jump to content

Archived

This topic is now archived and is closed to further replies.

Conjurer

LOAD DATA LOCAL INFILE not working

Recommended Posts

I am running version 4.0.12.NT on a Win XP Pro OS.

 

I am trying to work through the MySQL book by DuBois. When I try to run a load command I get an error.

 

From the mysql prompt I entered:

LOAD DATA LOCAL INFILE \'member.txt\' INTO TABLE member;

 

What I get is:

Error 1148: The used command is not allowed with this MySQL version.

 

Why is Load Data command not working? How can I fix this?

 

I should add that if I go to command prompt and use

mysqlimport --local sampdb member.txt

that works. The file loads.

 

:roll:

Share this post


Link to post
Share on other sites
LOAD DATA LOCAL INFILE \'member.txt\' INTO TABLE member;  

 

What I get is:  

Error 1148: The used command is not allowed with this MySQL version.  

 

try to remove the LOCAL :

 

LOAD DATA INFILE \'member.txt\' INTO TABLE member;

Share this post


Link to post
Share on other sites

Tried that ... now I get a different error:

 

LOAD DATA INFILE \'member.txt\' INTO TABLE member;

ERROR 1105: File \'.sampdbmember.txt\' not found (Errcode: 2)

 

Which I don\'t understand because the current directory is where the file is located. When I do a \"dir\" at the cmd prompt it returns:

Directory of C:Documents and SettingsRLaneMy DocumentsActive Web SitesLocalhostsampdb

 

and the listing of files shows the member.txt file.

 

Are we getting closer?

 

:)

Share this post


Link to post
Share on other sites

to see if it works put the file member.txt on the root (ie c:) and try this

 

LOAD DATA INFILE \'c:member.txt\' INTO TABLE member;

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.