Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

LOAD DATA LOCAL INFILE and ERROR 1148

Status
Not open for further replies.

123jon

Programmer
Jan 11, 2003
14
US
When I execute the follwing command:
LOAD DATA LOCAL INFILE "pet.txt" INTO TABLE pet;

I am getting the following error:
'ERROR 1148: THE USED COMMAND IS NOT ALLOWED WITH THIS MySQL VERSION'

I am using MySQL version 3.23.54-max-debug.

I start MySQL with MYSQLD --LOCAL-INFILE=1
I thought that would solve the problem.

Anyway, someone please tell me how to load a text file to a table.

Thank you.
 
Try replacing the " with ' quotes.

I had this problem before and it was something really daft like that. - I'm still running the same version and INFILE works just fine now so I know it can't have been much. ______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
Nah it was far more obvious .. mysql version 3.23.49 - local infile disabled by default unless specifically compiled in at build time.

To get round it start a mysql session from a command prompt using mysql --local-infile=1

more details can be found by searching mysql.com for Error 1148.

______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
Thank you all 'MYSQL -u username --LOCAL-INFILE=1' worked.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top