Hello,

I am trying to use the LOAD DATA LOCAL INFILE MySQL
command from Perl.
(I have Perl v5.6.1 . DBI.pm is dated Feb 6 2002.)

As of version MySQL 3.23.49 (which is what I have),
MySQL changed so that this command was only
allowed under certain conditions
(see http://www.mysql.com/doc/L/O/LOAD_DATA_LOCAL.html ).

If these conditions are not met, when one tries to use
LOAD DATA LOCAL INFILE, one gets the following error:

   The used command is not allowed with this MySQL version

This is what I am getting.

>From an old thread on the MySQL mailing list, a solution is
supposed to be to add the option
  --local-infile
to the command line when you invoke both the client mysql
and the server mysqld. 

I can and do invoke mysqld this way, but what does it mean
to invoke mysql this way, when the client is Perl DBI?
That is my basic question.

I tried using these values of db_str as the 1st arg to DBI->connect() :
   dbi:mysql:database=SPOTPLAY;local-infile=1  
   dbi:mysql:database=SPOTPLAY;local_infile=1  
   dbi:mysql:database=SPOTPLAY;mysql_read_default_file=/etc/my.cnf

where my.cnf had entries
   [perl]
   local-infile=1
   [client]
   local-infile=1
(Dumped core when I added [client])


Also of interest: the LOAD DATA LOCAL INFILE command works fine
from inside the phpMyAdmin GUI web page.
I assume that means it is running on the server,
whereas Perl is a client.

I haven't had any response to this issue on the MySQL lists,
so I'd appreciate any insights anyone here can give.





=====
Tom Atwater
tomath2o.yahoo.com

__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

Reply via email to