[development] [support] The used command is not allowed with this mysql version query
vyasamit2007 at gmail.com
Tue Nov 29 21:27:50 UTC 2011
Thanks for all the replies and support.
I have found the solution:
Here are the steps I followed:
1. Removed Load Data from the .module file.
2. Since drupal is not supporting mysql_connect from the module file, I
have created a new .php file in which I have called "mysql_connect" with
the "client_flag" parameter passed as 128. More details
3. Now when my cron runs I'm doing my usual stuff, and then after that
calling my .php script at the end.
4. in .php file I have mysql_connect which will connect to my database
server and run LOAD DATA query and then come back to my module file to do
I know this is not a 100% or full proof solution BUT right now in situation
like mine, I can't afford to spend more time on this so it is as it is.
Let me know if one of you can find any other soulution. BTW. this is
On Sat, Nov 19, 2011 at 6:58 PM, sumeet pareek <positivecharge at gmail.com>wrote:
> Just found the below details here -
> I think this might help..
> Let me elaborate what took forever to find out..(*NIX)
> 1=ON; 0=OFF; LOCAL != PHP;
> LOAD DATA INFILE '/full_path_to_file/your_file.txt' INTO TABLE your_table
> You MUST have a compiled MySQL with '--enable-local-infile '
> You MUST have compiled PHP using the full path to MySQL, otherwise it will
> use it's internal handlers, which don't work with the "new" LOAD DATA.
> --with-mysql=/usr/local/mysql (assuming your MySQL is located here)
> You MUST start the MySQL daemon with the option '--local-infile=1'
> On Sat, Nov 19, 2011 at 6:55 PM, sumeet pareek <positivecharge at gmail.com>wrote:
>> 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.
>> Do post your solution when you find one.
>> On Sat, Nov 19, 2011 at 6:41 PM, Amit Vyas <vyasamit2007 at gmail.com>wrote:
>>> Hello Druplers,
>>> Have been in this problem from last 3 days and did a lot of google but
>>> didn't able to find any solution which work for me. Here is the problem:
>>> I have to go live and I have two servers on Joyent. one is for database
>>> and another is for durpal installation with files.
>>> 1. I'll get one file in the drupal's files directory, based on that
>>> file I have to update my tables.
>>> 2. 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.
>>> 3. 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).
>>> 4. Now the problem occurs,
>>> 5. When I run the cron, its giving me the error " user warning: The
>>> used command is not allowed with this MySQL version query: LOAD DATA LOCAL
>>> INFILE '/file/path/file.csv' IGNORE INTO table temp_table FIELDS
>>> TERMINATED BY ',' IGNORE 1 LINES "
>>> We have tried these solutions:
>>> 1. We have added "LOCAL INFILE=1" in my.cnf in "client" and "mysql"
>>> on both server [Which didn't work]: here is what we have done in my.cnf
>>> - [client]
>>> port = 3306
>>> socket = /tmp/mysql.sock
>>> local-infile =1
>>> - [mysqld]
>>> port = 3306
>>> bind-address = 127.0.0.1
>>> #bind-address = 10.12.24.151
>>> socket = /tmp/mysql.sock
>>> local-infile = 1
>>> 2. 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.
>>> 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?
>>> Amit Vyas
>>> Email : vyasamit2007 at gmail.com Skype : vyasamit2004
>>> Mobile : +91 993-040-1490 Phone : +91-022
>> Sumeet Pareek
> Sumeet Pareek
> [ Drupal support list | http://lists.drupal.org/ ]
Email : vyasamit2007 at gmail.com Skype : vyasamit2004
Mobile : +91 993-040-1490 Phone : +91-022
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the development