Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Error when impot csv file using phpmyAdmin


Guest

Recommended Posts

Posted

Really need ur suggetions on this one --> I searched this forum and didn't find anyone having this problem yet. I tried to import a csv file using phpmyadmin. This is what i got...when i hit submit

 

//--------------------------------------------------------------------------------

Database catalog - table products

Error

SQL-query:

 

LOAD DATA LOCAL INFILE '/tmp/phpY3BWEJ' REPLACE INTO TABLE products FIELDS TERMINATED BY ',' ENCLOSED BY '"' ESCAPED BY '' LINES TERMINATED BY 'n'

 

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

//--------------------------------------------------------------------------------

 

mysql version is 3.23.49

phpmyadmin version is 2.1.0

php version is 4.2.2

all these are on Linux box.

 

I'm sure i did everything right cuz i followed step-by-step from many searched threads in this forum.

 

Any suggestions on what to do. Thank you all.... -Jim-

Posted

Just to let u know how to get around this issue if u have the same problem.

Read this: http://www.mysql.com/doc/en/LOAD_DATA_LOCAL.html

 

My web hosting has MySQL version 3.23.49 which gives me a security issue importing csv file using PhpMyAdmin (LOAD DATA LOCAL INFILE).

I don't have permission to configure anything in MySQL. Therefore, I get around this problem by uploading my csv file into my web server directory with FTP.

And run 'mysql catalog'

-> LOAD DATA INFILE 'dir/csv filename' REPLACE INTO TABLE `your table` FIELDS TERMINATED BY ',' ENCLOSED BY '' ESCAPED BY '' LINES TERMINATED BY 'n';

 

Note that i don't use 'LOAD DATA LOCAL INFILE', because my csv file is already in my server directory.

 

Hope it might help whoever has the same problem. -Jim-

Archived

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

×
×
  • Create New...