Jump to content


Photo

LOAD DATA LOCAL INFILE not working


  • Please log in to reply
3 replies to this topic

#1 Conjurer

Conjurer
  • Members
  • PipPipPip
  • Advanced Member
  • 107 posts

Posted 11 November 2003 - 05:54 AM

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:

#2 Glish

Glish
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 12 November 2003 - 06:11 AM

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;

#3 Conjurer

Conjurer
  • Members
  • PipPipPip
  • Advanced Member
  • 107 posts

Posted 12 November 2003 - 06:33 AM

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?

:)

#4 Glish

Glish
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 12 November 2003 - 06:37 AM

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;




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users