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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

LOAD command not working

Status
Not open for further replies.

Sveno

Technical User
Jan 8, 2002
27
AU
Hi,

I have just loaded MySQL onto a Windows NT box and I cannot get the load command to work, I keep getting 1148 The used command is not allowed with this mySQL version.

I have tried --local-infile[=1]
This did not return errors, but also did not work.

Does anyone know if there is something I can change in the \winnt\my.ini file - or another easy fix?

Cheers

Mark Svensson
 
Read this




It looks like your LOAD DATA LOCAL INFILE is still disabled

try passing the enable command in Mysql prompt again

LOAD DATA LOCAL --local-infile[=1]


Bye

Qatqat


The reason why my girlfriend can read my thoughts is because mine are properly written! (G.Lepore)
 
Otherwise try using mysqlimport


assuming that your fields are terminated by |
assuming that the fields are enclosed by "
and assuming that your lines are simply terminated with return

mysqlimport -L -h host -u user -ppassord --fields-terminated-by='|' --fields-enclosed-by=\" database_name file_to_import.txt


You may need to escape the pipe sign | (I honestly don't remember if you have to)


Bye


Qatqat The reason why my girlfriend can read my thoughts is because mine are properly written! (G.Lepore)
 
Thank you for replying..

I had already downloaded the manual, but that hasn't help me.

I tried entering --local-infile[=1] into the command line, but to no avail. I also made this part of the LOAD statement, but ended up with syntax errors.

I also tried mysqlimport, but got the same security error.

I have been editing the my.ini file, but again none of the syntax in the manual actually worked. I am unable to change the default option of not allowing data imports.

Does anyone know the exact syntax which can be put in the my.ini file to enable importing?

Cheers

Mark

 
Thank you!!

Without using LOCAL in the command, the tables loaded successfully.

If anyone is interested, I am looking for an alternative to MSACCESS for our users here, as the two gigabyte limit is very restricting as we use large tables.

On the same PC, using the same tables, (with the same indexes) ACCESS is actually returning simple queries faster than MySQL.

However as the queries increase in complexity, MySQL is returning faster.

Cheers

Mark Svensson
 
if you want faster access, try mysql under linux then :) ______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top