Hmm. I have not tried LOAD DATA query for myself ever, but have some general advice. How about trying the query from a php file after connecting to your db using mysql_db_connect(). If it does not work even then, perhaps you could ask the question on a mysql forum for more help. If it does, then it would be drupal specific problem and perhaps somebody here will be able to help.<div>
<br></div><div>Do post your solution when you find one.<br><br><div class="gmail_quote">On Sat, Nov 19, 2011 at 6:41 PM, Amit Vyas <span dir="ltr">&lt;<a href="mailto:vyasamit2007@gmail.com">vyasamit2007@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hello Druplers,<div><br></div><div>Have been in this problem from last 3 days and did a lot of google but didn&#39;t able to find any solution which work for me. Here is the problem:</div>
<div><br></div><div>I have to go live and I have two servers on Joyent. one is for database and another is for durpal installation with files.</div>

<div><ol><li>I&#39;ll get one file in the drupal&#39;s files directory, based on that file I have to update my tables.</li><li>I have written a module which will get that file and using LOAD DATA LOCAL INFILE, it will load all the data from csv file to a temp table.</li>


<li>And this will be done when cron will run. It will execute the code and move the file to some other folder and load all the data and update the database(which is on other server).</li><li>Now the problem occurs, </li>

<li>
When I run the cron, its giving me the error &quot;
<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">user warning: The used command is not allowed with this MySQL version query: LOAD DATA LOCAL INFILE &#39;/file/path</span><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">/file</span><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">.csv&#39; IGNORE INTO table temp_table FIELDS TERMINATED BY &#39;,&#39; IGNORE 1 LINES</span> &quot;</li>


</ol><div>We have tried these solutions:</div><div><ol><li>We have added &quot;LOCAL INFILE=1&quot; in my.cnf in &quot;client&quot; and &quot;mysql&quot; on both server [Which didn&#39;t work]: here is what we have done in my.cnf</li>


<ul><ul><li><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"> </span><span dir="ltr" style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">[client]<br>


port = 3306<br>socket = /tmp/mysql.sock<br>local-infile =1</span></li></ul><ul><li><font color="#222222" face="arial, sans-serif"><span style="font-size:13px;background-color:rgb(255,255,255)">[mysqld]</span><br style="font-size:13px;background-color:rgb(255,255,255)">


<span style="font-size:13px;background-color:rgb(255,255,255)">port = 3306</span><br style="font-size:13px;background-color:rgb(255,255,255)"><span style="font-size:13px;background-color:rgb(255,255,255)">bind-address = 127.0.0.1</span><br style="font-size:13px;background-color:rgb(255,255,255)">


<span style="font-size:13px;background-color:rgb(255,255,255)">#bind-address = 10.12.24.151</span><br style="font-size:13px;background-color:rgb(255,255,255)"><span style="font-size:13px;background-color:rgb(255,255,255)">socket = /tmp/mysql.sock</span><br style="font-size:13px;background-color:rgb(255,255,255)">


<span style="font-size:13px;background-color:rgb(255,255,255)">skip-external-l</span><span style="font-size:13px;background-color:rgb(255,255,255)">ocking</span><br style="font-size:13px;background-color:rgb(255,255,255)">


<span style="font-size:13px;background-color:rgb(255,255,255)">#skip-bdb</span><br style="font-size:13px;background-color:rgb(255,255,255)"><span style="font-size:13px;background-color:rgb(255,255,255)">local-infile = 1</span>
</font></li></ul></ul><li>When we connect from fileserver to database server with command line and execute the same sql query then it is working fine BUT not with drupal module.</li></ol></div><div>We are now just frustrated with this error because we are solving this from last 3 days and management is on us :) Can anyone has experience with this type of problem before?</div>


<div><br></div><div>Thanks!</div><span class="HOEnZb"><font color="#888888"><div><br></div>-- <br><font size="2"><span style="font-family:tahoma,sans-serif">Cheers,</span><br style="font-family:tahoma,sans-serif"><span style="font-family:tahoma,sans-serif">Amit Vyas</span></font><br style="font-family:tahoma,sans-serif">


<span style="font-family:tahoma,sans-serif;color:rgb(102,102,102)">____________________________________</span><span style="font-family:tahoma,sans-serif;color:rgb(102,102,102)">____________________________</span><span style="font-family:tahoma,sans-serif;color:rgb(102,102,102)">____________</span><span style="font-family:tahoma,sans-serif;color:rgb(102,102,102)">____</span><br style="font-family:tahoma,sans-serif">


<span style="font-family:tahoma,sans-serif;color:rgb(51,51,51)">Email  : </span><a style="font-family:tahoma,sans-serif;color:rgb(51,51,51)" href="mailto:vyasamit2007@gmail.com" target="_blank">vyasamit2007@gmail.com</a><span style="font-family:tahoma,sans-serif;color:rgb(51,51,51)">               Skype : vyasamit2004</span><br style="font-family:tahoma,sans-serif;color:rgb(51,51,51)">


<span style="font-family:tahoma,sans-serif;color:rgb(51,51,51)">Mobile : <a href="tel:%2B91%20993-040-1490" value="+919930401490" target="_blank">+91 993-040-1490</a>                          Phone : <a href="tel:%2B91-022%20428-884-07" value="+912242888407" target="_blank">+91-022 428-884-07</a>   </span><br>

</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div>Sumeet Pareek</div><br>
</div>