I'm getting the following error: (Invalid query: The used command is not allowed with this MySQL) when trying to download a new csv file.

Author Mike West on June 20, 2010 | Print | Bookmark

Your MySql is not setup for "LOAD DATA LOCAL INFILE" to work. I use this MySql statement because it takes just a few seconds to insert the 10 mb data feed into MySql. This is what the script looks like for that area and you can show your hosts what the script is trying to do.

 
  $filename = "feeds/sql_export_main.csv";
 
  $query = "LOAD DATA LOCAL INFILE '$filename' INTO TABLE `STC_csv` FIELDS TERMINATED BY ',' ENCLOSED BY '\"' LINES TERMINATED BY '\n'";
  $result = MySql_query($query) or die("Invalid query: " . MySql_error().__LINE__.__FILE__);
 
 
To enable the "LOAD DATA LOCAL INFILE", have your host try this with the MySql server setup:
 
Ensure that this is in the server my.ini file:
[mysqld]
local-infile=1
....

[mysql]
local-infile=1
...

Restart MySql so the my.ini file is read
Open Options > Manual Update > Click the download csv button to see if that fixed it.

Was this article helpful?

Yes No

Category: STCtoCart General Questions, STCtoPresta General Questions, STCtoMag General Questions

Last updated on July 7, 2011 with 657 views