tomkocz Posted May 16, 2008 Share Posted May 16, 2008 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 Quote Link to comment https://forums.phpfreaks.com/topic/105860-php-error/ Share on other sites More sharing options...
cooldude832 Posted May 16, 2008 Share Posted May 16, 2008 if the .txt file you stated is a mysql dump file try opening it and copy and pasting into phpmyadmin. Quote Link to comment https://forums.phpfreaks.com/topic/105860-php-error/#findComment-542616 Share on other sites More sharing options...
fenway Posted May 16, 2008 Share Posted May 16, 2008 That's likely because you used LOCAL and your my.cnf file doesn't allow it. Quote Link to comment https://forums.phpfreaks.com/topic/105860-php-error/#findComment-543024 Share on other sites More sharing options...
tomkocz Posted December 19, 2008 Author Share Posted December 19, 2008 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 Quote Link to comment https://forums.phpfreaks.com/topic/105860-php-error/#findComment-720033 Share on other sites More sharing options...
fenway Posted December 22, 2008 Share Posted December 22, 2008 You have not provided any additional information... you don't have access to this command, as per your host's configuration. Quote Link to comment https://forums.phpfreaks.com/topic/105860-php-error/#findComment-721564 Share on other sites More sharing options...
tomkocz Posted December 23, 2008 Author Share Posted December 23, 2008 Hi - what other information would you like me to provide and I take care of that. thanks Quote Link to comment https://forums.phpfreaks.com/topic/105860-php-error/#findComment-722262 Share on other sites More sharing options...
fenway Posted December 23, 2008 Share Posted December 23, 2008 Look here. Quote Link to comment https://forums.phpfreaks.com/topic/105860-php-error/#findComment-722530 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.