Jump to content

Recommended Posts

I am trying to load data from a file into our mysql database .  The command is  :

LOAD  DATA  LOCAL  INFILE  'C:\Data\HOME\BestShoppers\ProductData\AlabamaNCAAwatches.txt' REPLACE  INTO  TABLE  `products`

FIELDS  TERMINATED  BY  ','

OPTIONALLY  ENCLOSED  BY  '\''

 

I get an error stating the following :

MySQL said:

 

The used command is not allowed with this MySQL version

 

We are running version :

Welcome to phpMyAdmin 2.5.2-pl1

 

MySQL 4.0.18 running on localhost

 

 

Why does this not work?

thanks

Link to comment
https://forums.phpfreaks.com/topic/105860-php-error/
Share on other sites

  • 7 months later...

Still trying to import data from a .txt file. File used to load fine - maybe new version of mysl was installed by our web hoster.

We have file  looks like (this is one row)  :

'','MSS-WAS-TEST','mlb','washingtonnationals','y',4,'<font color=\"cc0000\"><b>Washington Nationals Ladies Sapphire  Series Watch .  </b>  Features:

* Official Team Logo Embossed in Platinum

* Sapphire Crystal Lens

* Stainless Steel Case and Bracelet

* Citizen Quartz Movement

* Water Resistant to 5 ATM (165 Feet)

* Limited Lifetime Warranty ','Washington Nationals Ladies Sapphire Series Watch ','138.00','239.95',1,'<a href="http://www.bestshoppers.com/images/MSS-WAS.jpg"><!--$img %ImageAssetImpl:http://www.bestshoppers.com/images/MSS-WAS.jpg $--><img src="http://www.bestshoppers.com/images/MSS-WAS.jpg" width="140" height="180" border="0"></a><br><font size="1">Click to Enlarge</font>','xx',2005

 

Table Structure looks like :

products

Table comments : stores details about all the products that are available

 

Field Type Null Default

productid  bigint(20) Yes  NULL

Distproductid  varchar(25) Yes  NULL

Sub_Productid  varchar(25) Yes  NULL

Sub_code  varchar(30) Yes  NULL

instock  char(1) Yes  n

distributorid  bigint(20) Yes  0

long_description  text Yes 

short_description  text Yes 

Mycost  decimal(12,2) Yes  0.00

price  decimal(12,2) Yes  0.00

quantity  int(11) Yes  1

imagelocation  text Yes 

htmlcodeforaddtoshopcart  varchar(255) Yes 

timestamp  timestamp Yes  CURRENT_TIMESTAMP

 

Error I get  (when I check the DATA box) :

 

Error

 

SQL-query :

 

LOAD DATA INFILE '/var/tmp/phpdu0tZO' REPLACE INTO TABLE `products`

FIELDS TERMINATED BY ','

ENCLOSED BY '\''

ESCAPED BY '\\'

LINES TERMINATED BY '\r\n'

 

MySQL said:

 

Access denied for user 'tomkocz_test'@'%' (using password: YES)

 

Error I get (when DATA_LOCAL is checked ) :

Error

 

SQL-query :

 

LOAD DATA LOCAL INFILE '/var/tmp/phpwhQMYg' REPLACE INTO TABLE `products`

FIELDS TERMINATED BY ','

ENCLOSED BY '\''

ESCAPED BY '\\'

LINES TERMINATED BY '\r\n'

 

MySQL said:

 

The used command is not allowed with this MySQL version

 

 

 

We are using the GUI interface supplied by our web host provider - version is :

Welcome to phpMyAdmin 2.5.2-pl1

 

MySQL 5.0.22 running on localhost as tomkocz_test@10.1.1.60

 

Link to comment
https://forums.phpfreaks.com/topic/105860-php-error/#findComment-720033
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.