[development] The used command is not allowed with this mysql version query
Amit Vyas
vyasamit2007 at gmail.com
Sat Nov 19 13:11:11 UTC 2011
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
skip-external-locking
#skip-bdb
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?
Thanks!
--
Cheers,
Amit Vyas
____________________________________________________________________________
____
Email : vyasamit2007 at gmail.com Skype : vyasamit2004
Mobile : +91 993-040-1490 Phone : +91-022
428-884-07
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20111119/2a79e9b8/attachment.html
More information about the development
mailing list