By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,290 Members | 1,388 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,290 IT Pros & Developers. It's quick & easy.

LOAD DATA LOCAL INFILE and Perl DBI/DBD

P: n/a
HI all,

For the past several months we have been using LOAD DATA LOCAL INFILE to bulk load tables within
Perl modules.

Recently, someone thought it would be a good idea to upgrade the Solaris machines - I'm thinking it
wasn't that good an idea :-(

We are now running MySQL 4.0.18 and the DBI version is 1.35. Now, our scripts are failing with the
dreaded "The used command is not allowed with this MySQL version" message. Here's what I know at
the moment:

1. mysqld has local infile enabled.
2. mysql client can perform a LOAD DATA LOCAL INFILE
3. dbimon cannot perform a LOAD DATA LOCAL INFILE (same message as above).

So as I understand this, DBI is somehow not allowing the local option. I tried adding the
local_infile=1 option on the DSN, but that didn't help (if there was an error, it was silently
ignored).

Two questions:
1. How can I get the LOCAL option working?
2. How can I identify the source of the problem better so we don't waste more time in the future?

Thanks!

Jami

Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
As a workaround, we had to code the module to shell out to mysql and execute each of the (100)
commands. Obviously this is really slow because each command establishes a connection, executes,
then closes the connection.

Does anyone have any suggestions how we can get back to using DBI, this is driving me crazy :-)

Thanks!

Jami
On Wed, 23 Jun 2004 08:40:09 -0600, Jami Bradley <jb******@isa-og.com> wrote:
HI all,

For the past several months we have been using LOAD DATA LOCAL INFILE to bulk load tables within
Perl modules.

Recently, someone thought it would be a good idea to upgrade the Solaris machines - I'm thinking it
wasn't that good an idea :-(

We are now running MySQL 4.0.18 and the DBI version is 1.35. Now, our scripts are failing with the
dreaded "The used command is not allowed with this MySQL version" message. Here's what I know at
the moment:

1. mysqld has local infile enabled.
2. mysql client can perform a LOAD DATA LOCAL INFILE
3. dbimon cannot perform a LOAD DATA LOCAL INFILE (same message as above).

So as I understand this, DBI is somehow not allowing the local option. I tried adding the
local_infile=1 option on the DSN, but that didn't help (if there was an error, it was silently
ignored).

Two questions:
1. How can I get the LOCAL option working?
2. How can I identify the source of the problem better so we don't waste more time in the future?

Thanks!

Jami


Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.