473,385 Members | 2,028 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

LOAD DATA LOCAL INFILE and Perl DBI/DBD

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
1 4033
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Pieter Van Waeyenberge | last post by:
Hello i have most recent php & mysql versions running on a linuxmachine i want to use LOAD DATA LOCAL INFILE and pass it from php to mysql. - the file i load is given with full path and the...
14
by: Bruce A. Julseth | last post by:
When I execute this SQL statement in my PHP code, I get an error "File '.\Address.txt' not found (Errcode: 2)" $File = addslashes(".\Address.txt"); $SQL = "Load Data InFile \"" . $File . "\"...
3
by: Otto | last post by:
Hello to all I have a problem how to write correctly a PHP string. I did the following import with the help of PHPMyAdmin: Nombre d'enregistrements insérés : 364 (traitement: 0.0553 sec.)...
0
by: Donald Tyler | last post by:
Then the only way you can do it that I can think of is to write a PHP script to do basically what PHPMyAdmin is trying to do but without the LOCAL in there. However to do that you would need to...
0
by: Rajesh Kapur | last post by:
Hello, I am running MySQL 4.0.16. I get the error 'The used command is not allowed with this MySQL version' when using the 'load data local infile' command. The local_infile is ON; the select *...
1
by: Ray in HK | last post by:
What are the differences between LOAD DATA INFILE and LOAD DATA LOCAL INFILE ? I found some web hosting company do not allow using LOAD DATA INFILE but allow LOAD DATA LOCAL INFILE. The reason...
3
by: nsh | last post by:
mailing.database.mysql, comp.lang.php subject: does "LOAD DATA" EVER work?!? I've tried EVERYTHING! version info: my isp is running my web page on a linux box with php ver. 4.4.1 according to...
3
by: chamindas | last post by:
$singlequote ="\'"; $myquery="load data local infile '$filename' replace into table $tablename fields terminated by ';' enclosed by '$doublequote' escaped by '$singlequote' "; ...
1
by: Megi | last post by:
welcome, I input data form file to mysql with command: load data local infile.. The efect is that the data are duplicated or trippled..etc with every re-loading the script, but I need to load...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.