re: Problems with LOAD DATA LOCAL INFILE

2002-10-07 Thread Egor Egorov

Sorin,
Saturday, October 05, 2002, 8:33:23 AM, you wrote:

SC 1)Is it possible to enable LOAD DATA LOCAL INFILE from the configuration
SC file?
SC My.ini file is below:

SC [mysqld]
SC basedir=C:/mysql
SC datadir=C:/mysql/data
SC enable-local-infile
SC local_infile=1

SC When I perform the LOAD DATA LOCAL INFILE 'file_name.txt' INTO... command
SC from a client application using MyOBDC I receive the error message 1148
SC ('The used command is not allowed with this MySQL version').

SC Where is the mistake?

Add local-infile=1 in the [mysql] section, too.

SC The server version is 4.0.2.-alpha.

SC 2)Other problems appears when I use the 3.23.47 My SQL version.

SC 2.1.
SC In that case LOAD DATA LOCAL INFILE 'file_name.txt' INTO... works but
SC 'file_name.txt' is
SC loaded just if it reside on the server. But notice that I want to load the
SC file ('file_name.txt') from the client machine.
SC Again, what is wrong?

Hm ..
It's strange. I tested it on 3.23.52 and it worked as expected.

SC 2.2.
SC I tried another approach for this problem and I have performed from the
SC client machine a SELECT * FROM... INTO OUTFILE 'file_name.txt' command. Now,
SC everything goes well and LOAD DATA LOCAL INFILE 'file_name.txt' INTO...
SC works fine. It seems my troubles are finished, but... If I run again the
SC same command, another new file with the same name cannot be created (because
SC 'file_name.txt' already exists). How can I remove the older 'file_name.txt',
SC doing this from the client side and using MyODBC?

No, you can't do it with MySQL.



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   ___/   www.mysql.com




-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Problems with LOAD DATA LOCAL INFILE

2002-10-07 Thread Mailing List Receiver

I have found to do a LOAD DATA LOCAL INFILE is no longer possible
using perl-DBI, even though local-infile=1 is in the [mysql], [mysqld],
and [client] sections of my.cnf.

I am not sure what prompted the engineering powers-that-be to 
change the default for this version, 3.23.49, of mysql, but it sure has
caused a lot of trouble.

Todd Merriman
[EMAIL PROTECTED]


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Problems with LOAD DATA LOCAL INFILE

2002-10-07 Thread Ronald Petty

I just tried the following and got

ysql load data local infile /home/repett0/contact.data into table
CONTACT;
ERROR 1148: The used command is not allowed with this MySQL version
mysql

I too use perl and dbi

What is going on?
Thanks
Ron



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Problems with LOAD DATA LOCAL INFILE

2002-10-07 Thread nellA hciR

the permissions on the file and the enclosing directory (all the way up 
to the root dir) must allow for execution

also, my.cnf need to have

[mysqld]
local-infile=1

#!/usr/bin/perl
use DBI;

$dbh = DBI-connect( dbi:mysql:databasename, 'user', 'password', {
PrintError = 0 } ) or die Can't connect to mysql database: 
$DBI::errstr\n;

$input = load data infile '/users/hcir/p99x/palmer/last/trk' into 
table trk;
$dbh-do($input) or warn $DBI::errstr\n;

$dbh-disconnect or print Disconnect failure: $DBI::errstr\n;

- hcir



On Monday, Oct 7, 2002, at 18:51 America/Anchorage, Ronald Petty wrote:

 I just tried the following and got

 ysql load data local infile /home/repett0/contact.data into table
 CONTACT;
 ERROR 1148: The used command is not allowed with this MySQL version
 mysql

 I too use perl and dbi

 What is going on?


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Problems with LOAD DATA LOCAL INFILE

2002-10-04 Thread Sorin Calinica

1)Is it possible to enable LOAD DATA LOCAL INFILE from the configuration
file?
My.ini file is below:

[mysqld]
basedir=C:/mysql
datadir=C:/mysql/data
enable-local-infile
local_infile=1

When I perform the LOAD DATA LOCAL INFILE 'file_name.txt' INTO... command
from a client application using MyOBDC I receive the error message 1148
('The used command is not allowed with this MySQL version').

Where is the mistake?

The server version is 4.0.2.-alpha.

2)Other problems appears when I use the 3.23.47 My SQL version.

2.1.
In that case LOAD DATA LOCAL INFILE 'file_name.txt' INTO... works but
'file_name.txt' is
loaded just if it reside on the server. But notice that I want to load the
file ('file_name.txt') from the client machine.
Again, what is wrong?

2.2.
I tried another approach for this problem and I have performed from the
client machine a SELECT * FROM... INTO OUTFILE 'file_name.txt' command. Now,
everything goes well and LOAD DATA LOCAL INFILE 'file_name.txt' INTO...
works fine. It seems my troubles are finished, but... If I run again the
same command, another new file with the same name cannot be created (because
'file_name.txt' already exists). How can I remove the older 'file_name.txt',
doing this from the client side and using MyODBC?


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php