Problem with mysqlimport and timestamp

2007-10-18 Thread qt4x11
Hi-
I'm using the command 'mysqlimport -u usr -ppassh -h mysqlserver -P 3306 -v
db --local $workdir/$filename'to import a table into mysql from a file
$filename.

The data in $filename looks something like:

test test

where there is a blank space between the two 'test's to represent an empty
column. This column is of type datetime NULL DEFAULT NULL in the database.
The blank space between the two 'test's gets imported as (err) instead of
NULL.


Is there a way I can import empty column data as NULL? I'd like there to be
a NULL for every row for which this column is empty.  I'm not sure how to do
this given the format of my $filename.  As a check, I tried inserting a row
at the top of $filename like

test

The row was imported correctly, as in there was a NULL in the timestamp
column in the database, as well as a NULL in the next column in the
database.  So, this may have something to do with the format of the
$filename, but I may not be able to control the format of that file.

Thanks.


Re: Problem with mysqlimport and timestamp

2007-10-18 Thread mysql

qt4x11 wrote:

Hi-
I'm using the command 'mysqlimport -u usr -ppassh -h mysqlserver -P 3306 -v
db --local $workdir/$filename'to import a table into mysql from a file
$filename.

The data in $filename looks something like:

test test

where there is a blank space between the two 'test's to represent an empty
column. This column is of type datetime NULL DEFAULT NULL in the database.
The blank space between the two 'test's gets imported as (err) instead of
NULL.


Is there a way I can import empty column data as NULL? I'd like there to be
a NULL for every row for which this column is empty.  I'm not sure how to do
this given the format of my $filename.  As a check, I tried inserting a row
at the top of $filename like

test

The row was imported correctly, as in there was a NULL in the timestamp
column in the database, as well as a NULL in the next column in the
database.  So, this may have something to do with the format of the
$filename, but I may not be able to control the format of that file.

Thanks.



You should alter your data like so:

test\N  test

That is, separate the fields with a tab and place \N wherever you want 
a NULL. As it is, the data is being misinterpreted, which is why the 
second import you mentioned worked--there was nothing after the first 
field to be erroneously put into the timestamp field.


If the data comes from somewhere else you will need to parse it out and 
re-write it using proper formatting, i'm afraid.


brian

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



update problem with mysqlimport (bug/misuse?)

2004-07-05 Thread j llarens
Hi people
I'm facing a (not huge) problem with mysqlimport.

The mysql version I'm using is MySQL
4.0.11a-gamma'-Max'

For updating a #29000 records table from fixed-lenght
ASCII file, I'm using a php script that gets a record
and executes and UPDATE for each one: pretty SLOW.

SO I read carefully mysqlimport and think that is THE
solution for the speed matter. BUT the fields that I
don't include in the mysqlimport field list get EMPTY!


Here are the details:

This is the table:

CREATE TABLE alfabeta (
  id mediumint(5) unsigned NOT NULL default '0',
  nombre varchar(30) NOT NULL default '',
  presenta varchar(30) NOT NULL default '',
  precio float(7,2) unsigned NOT NULL default '0.00',
  precio_ponderado float(7,2) unsigned NOT NULL
default '0.00',
  fecha_mod date NOT NULL default '-00-00',
  id_psico tinyint(1) NOT NULL default '0',
  anexo tinyint(1) unsigned NOT NULL default '0',
  pami char(1) NOT NULL default '0',
  id_laboratorio smallint(4) unsigned NOT NULL default
'0',
  baja tinyint(1) unsigned NOT NULL default '0',
  heladera tinyint(1) unsigned NOT NULL default '0',
  id_troquel int(10) unsigned NOT NULL default '0',
  id_monodroga mediumint(6) unsigned NOT NULL default
'0',
  id_acfa smallint(5) unsigned NOT NULL default '0',
  id_codbarra bigint(13) unsigned NOT NULL default
'0',
  unidades smallint(4) unsigned NOT NULL default '0',
  importado tinyint(1) unsigned NOT NULL default '0',
  sifar char(1) NOT NULL default ,
  id_tamano smallint(2) unsigned NOT NULL default '0',
  id_tipounid smallint(4) unsigned NOT NULL default
'0',
  id_tipovta tinyint(1) NOT NULL default '0',
  id_acciofar int(2) NOT NULL default '0',
  PRIMARY KEY  (id),
  KEY id_troquel (id_troquel),
  KEY nombre (nombre,presenta)
) TYPE=MyISAM;

The mysqlimport command:

mysqlimport osdata -u owner -pofthedata --debug -c
id,nombre,presenta,precio,id_psico,pami,id_laboratorio,baja,heladera,id_troquel,id_codbarra,unidades,importado,sifar,id_tamano,id_tipovta
-r -v -l alfabeta.csv

Note: the original file alfabeta.txt have fixed-lenght
fields, I use an awk script to convert to alfabeta.csv

The question is that, the field precio_ponderado, for
example, comes from another source, NOT from
alfabeta.csv, so I load it from another .csv in
another .php script. But after the execution of the
mysqlimport, it gets 0.00, when, well, I expect that
mysqlimport leaves it unchanged because I don't list
it in the -c clause.


So, is that a bug or mysqlimport is only useful for
populating empty tables and for that reason emptyes
the values of the columns not listed?

If so, I'll must to discard that sooo elegant solution
and use a .php script to make a HUGE .sql file with
UPDATE's (IdontwantitIdontwantitIdontwantit!)

thanks in advance
Jorge Llarens





___
100mb gratis, Antivirus y Antispam
Correo Yahoo!, el mejor correo web del mundo
http://correo.yahoo.com.ar

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: update problem with mysqlimport (bug/misuse?)

2004-07-05 Thread Paul DuBois
At 12:03 -0300 7/5/04, j llarens wrote:
Hi people
I'm facing a (not huge) problem with mysqlimport.
The mysql version I'm using is MySQL
4.0.11a-gamma'-Max'
For updating a #29000 records table from fixed-lenght
ASCII file, I'm using a php script that gets a record
and executes and UPDATE for each one: pretty SLOW.
SO I read carefully mysqlimport and think that is THE
solution for the speed matter. BUT the fields that I
don't include in the mysqlimport field list get EMPTY!
mysqlimport is for adding new records (or replacing
existing ones).  It does not update existing records.
--
Paul DuBois, MySQL Documentation Team
Madison, Wisconsin, USA
MySQL AB, www.mysql.com
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: Problem with mysqlimport

2003-12-10 Thread Pawe Filutowski
 --local is a valid option for mysqlimport in 3.23.49 according to the
 manual.  (Source: http://www.cict.fr/app/mysql/manual.html#mysqlimport)
 What is the entire command you are using?

Hi,

My command is:
mysqlimport -p -L ilk  gwarancje.txt

And I get error:

mysqlimport: Error: The used command is not allowed with this MySQL
version, when using table: gwarancje

I used this command by Linux shell  (logged as root).

Regards




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Problem with mysqlimport

2003-12-09 Thread Pawe Filutowski
I tryed to import from text file (columns divided by tabulators) like this:

5724KF2003CSDEUROPAPARKAN2003-12-12MarcinTamkanono
.
.
.

On PHPTriad (under Windows 2000) it works perfectly !
I use command: mysqlimport database file.txt

But under Linux (RedHat) i have serious problem.
System indicates problem:
mysqlimport: Error: Can't get stat of '/root/mysql/gwarancje.txt' (Errcode: 13),
 when using table: gwarancje
where gwarancje is the name of table.

I tryed to set privileges by chmod 777 command or smilar but it still doesn`t work.

Does anybody have any ideas ??

Regards, 
Paul














Re: Problem with mysqlimport

2003-12-09 Thread jeffrey_n_Dyke

is there a higher level directory that does not allow excecution?  does it
work if you run it as root?  can you 'vi /root/mysql/gwarancje.txt'?

just some thoughts
Jeff


   
 
  Pawe Filutowski 
 
  [EMAIL PROTECTED]To:   [EMAIL PROTECTED]  
  
  rfam.pl cc: 
 
   Subject:  Problem with mysqlimport  
 
  12/09/2003 10:27 
 
  AM   
 
   
 
   
 




I tryed to import from text file (columns divided by tabulators) like this:

5724KF2003CSDEUROPAPARKAN2003-12-12MarcinTamka
nono
.
.
.

On PHPTriad (under Windows 2000) it works perfectly !
I use command: mysqlimport database file.txt

But under Linux (RedHat) i have serious problem.
System indicates problem:
mysqlimport: Error: Can't get stat of '/root/mysql/gwarancje.txt'
(Errcode: 13),
 when using table: gwarancje
where gwarancje is the name of table.

I tryed to set privileges by chmod 777 command or smilar but it still
doesn`t work.

Does anybody have any ideas ??

Regards,
Paul

















--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Problem with mysqlimport

2003-12-09 Thread Matt Griffin
If the the file is on the same machine as your shell is running,
specify --local when running mysqlimport.

Matt

-Original Message-
From: Pawe Filutowski [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 09, 2003 10:27 AM
To: [EMAIL PROTECTED]
Subject: Problem with mysqlimport


I tryed to import from text file (columns divided by tabulators) like this:

5724KF2003CSDEUROPAPARKAN2003-12-12MarcinTamka
nono
.
.
.

On PHPTriad (under Windows 2000) it works perfectly !
I use command: mysqlimport database file.txt

But under Linux (RedHat) i have serious problem.
System indicates problem:
mysqlimport: Error: Can't get stat of '/root/mysql/gwarancje.txt' (Errcode:
13),
 when using table: gwarancje
where gwarancje is the name of table.

I tryed to set privileges by chmod 777 command or smilar but it still
doesn`t work.

Does anybody have any ideas ??

Regards,
Paul














-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Problem with mysqlimport

2003-12-09 Thread Pawe Filutowski
I tryed this option but i got following error:

mysqlimport: Error: The used command is not allowed with this MySQL
version, when using table: gwarancje

MySQL version is  3.23.49

What Can I do ??

Regards



- Original Message - 
From: Matt Griffin [EMAIL PROTECTED]
To: 'Pawe3 Filutowski' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, December 09, 2003 5:11 PM
Subject: RE: Problem with mysqlimport


 If the the file is on the same machine as your shell is running,
 specify --local when running mysqlimport.

 Matt

 -Original Message-
 From: Pawe Filutowski [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, December 09, 2003 10:27 AM
 To: [EMAIL PROTECTED]
 Subject: Problem with mysqlimport


 I tryed to import from text file (columns divided by tabulators) like
this:

 5724KF2003CSDEUROPAPARKAN2003-12-12MarcinTamka
 nono
 .
 .
 .

 On PHPTriad (under Windows 2000) it works perfectly !
 I use command: mysqlimport database file.txt

 But under Linux (RedHat) i have serious problem.
 System indicates problem:
 mysqlimport: Error: Can't get stat of '/root/mysql/gwarancje.txt'
(Errcode:
 13),
  when using table: gwarancje
 where gwarancje is the name of table.

 I tryed to set privileges by chmod 777 command or smilar but it still
 doesn`t work.

 Does anybody have any ideas ??

 Regards,
 Paul














 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Problem with mysqlimport

2003-12-09 Thread Matt Griffin
Paul,

--local is a valid option for mysqlimport in 3.23.49 according to the
manual.  (Source: http://www.cict.fr/app/mysql/manual.html#mysqlimport)
What is the entire command you are using?

Matt

-Original Message-
From: Pawe Filutowski [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 09, 2003 12:06 PM
To: [EMAIL PROTECTED]
Subject: Re: Problem with mysqlimport


I tryed this option but i got following error:

mysqlimport: Error: The used command is not allowed with this MySQL
version, when using table: gwarancje

MySQL version is  3.23.49

What Can I do ??

Regards



- Original Message -
From: Matt Griffin [EMAIL PROTECTED]
To: 'Pawe3 Filutowski' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, December 09, 2003 5:11 PM
Subject: RE: Problem with mysqlimport


 If the the file is on the same machine as your shell is running,
 specify --local when running mysqlimport.

 Matt

 -Original Message-
 From: Pawe Filutowski [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, December 09, 2003 10:27 AM
 To: [EMAIL PROTECTED]
 Subject: Problem with mysqlimport


 I tryed to import from text file (columns divided by tabulators) like
this:

 5724KF2003CSDEUROPAPARKAN2003-12-12MarcinTamka
 nono
 .
 .
 .

 On PHPTriad (under Windows 2000) it works perfectly !
 I use command: mysqlimport database file.txt

 But under Linux (RedHat) i have serious problem.
 System indicates problem:
 mysqlimport: Error: Can't get stat of '/root/mysql/gwarancje.txt'
(Errcode:
 13),
  when using table: gwarancje
 where gwarancje is the name of table.

 I tryed to set privileges by chmod 777 command or smilar but it still
 doesn`t work.

 Does anybody have any ideas ??

 Regards,
 Paul














 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]





--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Problem with mysqlimport.

2003-07-02 Thread Idries Hamadi
Hi all,

I've just started using mysql and I'm sure that my all problems are
something todo with my oracle-ness, so please bear with me if I use
case-insensitive table names or somthing ;)

Ok. I've been using the mysql interactive command-line interface for a few
days now, and there's no problem there. I've made myself a ~/.my.cnf file
and it appears to work:

[client]
user=idries_wedding
password=**

Since creating it I no longer need to enter username or password details
when I run mysql :)

Now, I'm trying to use mysqlimport:

idries ~/src/wedding/database$ mysqlimport idries_Wedding GUEST.txt
mysqlimport: Error: Access denied for user: '[EMAIL PROTECTED]'
(Using password: NO), when using table: GUEST

The problem here seems to be that mysqlimport is not reading the password
from the .my.cnf file. I had a similar problem with it not liking the
database option to be specified in the .my.cnf file, so I removed that. I
have tried several combinations of removing the password from the .my.cnf
file and removing the .my.cnf file completly.

For example:

idries ~/src/wedding/database$ mv ~/.my.cnf ~/..my.cnf
idries ~/src/wedding/database$
mysqlimport --user=idries_wedding --password= idries_Wedding GUEST.txt
mysqlimport: Error: Access denied for user: '[EMAIL PROTECTED]'
(Using password: NO), when using table: GUEST
idries ~/src/wedding/database$

The only way in which I can stop (Using password:NO) from being displayed is
to tell mysqlimport to prompt me for the password *AND* not specify a
username:

idries ~/src/wedding/database$ mysqlimport -p idries_Wedding GUEST.txt
Enter password:
mysqlimport: Error: Access denied for user: '[EMAIL PROTECTED]' (Using
password: YES)
idries ~/src/wedding/database$

Here the username is not specified, and so it obviously doesn't work, but it
does say (Using password:YES)

However:

idries ~/src/wedding/database$ mysqlimport -uidries_wedding -p
idries_Wedding GUEST.txt
Enter password:
mysqlimport: Error: Access denied for user: '[EMAIL PROTECTED]'
(Using password: NO), when using table: GUEST
idries ~/src/wedding/database$

Can anyone tell me where I am going wrong? What is the correct syntax for
calling mysqlimport while specifying a username and password and why doesn't
it use the .my.cnf file in the same was a mysql? I've consulted the manual
and everything that I've done seems to be in keeping with what's required.
Please help!

Also:

idries ~/src/wedding/database$ mysqlimport -V
mysqlimport  Ver 3.4 Distrib 4.0.13, for pc-linux (i686)
idries ~/src/wedding/database$ mysql -V
mysql  Ver 12.20 Distrib 4.0.13, for pc-linux (i686)
idries ~/src/wedding/database$

Thanx in advance,
Idries


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Problem with mysqlimport.

2003-07-02 Thread gerald_clark


Idries Hamadi wrote:

Hi all,

I've just started using mysql and I'm sure that my all problems are
something todo with my oracle-ness, so please bear with me if I use
case-insensitive table names or somthing ;)
Ok. I've been using the mysql interactive command-line interface for a few
days now, and there's no problem there. I've made myself a ~/.my.cnf file
and it appears to work:
[client]
user=idries_wedding
password=**
Since creating it I no longer need to enter username or password details
when I run mysql :)
Now, I'm trying to use mysqlimport:

 

How about
[mysqlimport]
user=idries_esdding
password=**
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: Problem with mysqlimport.

2003-07-02 Thread Paul DuBois
At 14:18 +0100 7/2/03, Idries Hamadi wrote:
Hi all,

I've just started using mysql and I'm sure that my all problems are
something todo with my oracle-ness, so please bear with me if I use
case-insensitive table names or somthing ;)
Ok. I've been using the mysql interactive command-line interface for a few
days now, and there's no problem there. I've made myself a ~/.my.cnf file
and it appears to work:
[client]
user=idries_wedding
password=**
Since creating it I no longer need to enter username or password details
when I run mysql :)
Now, I'm trying to use mysqlimport:

idries ~/src/wedding/database$ mysqlimport idries_Wedding GUEST.txt
mysqlimport: Error: Access denied for user: '[EMAIL PROTECTED]'
(Using password: NO), when using table: GUEST
The problem here actually has to do with how the file is getting read.
If you don't specify the --local option, mysqlimport sends a LOAD DATA
INFILE statement to the server, and the server itself tries to read the
file, using the filename 'GUEST.txt'.  That's a relative filename, and
no doubt will not be correct in terms of the server's current working
directory.
Try this command:

mysqlimport --local idries_Wedding GUEST.txt

mysqlimport should read your .my.cnf file properly.

The problem here seems to be that mysqlimport is not reading the password
from the .my.cnf file. I had a similar problem with it not liking the
database option to be specified in the .my.cnf file, so I removed that. I
have tried several combinations of removing the password from the .my.cnf
file and removing the .my.cnf file completly.


--
Paul DuBois, Senior Technical Writer
Madison, Wisconsin, USA
MySQL AB, www.mysql.com
Are you MySQL certified?  http://www.mysql.com/certification/

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Problem with mysqlimport

2003-01-17 Thread Shripal Shah
Dear Sir/Madam,

I've one data file which is built with the help of mysqldump. This file
contains structure  data of 2 tables of test database. Like this..

mysqldump -C --add-drop-table -e test patient hospital   UM.txt

then I am trying to import data using this statement..

mysqlimport test UM.txt

It give me error for table not found...

Please guide me regarding this matter..

Thanks  Regards,

Shripal.


-
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: Problem with mysqlimport

2003-01-17 Thread gerald_clark
Do not use mysqlimport.
That is for flat file import.

mysql test  UM.txt

Shripal Shah wrote:


Dear Sir/Madam,

I've one data file which is built with the help of mysqldump. This file
contains structure  data of 2 tables of test database. Like this..

mysqldump -C --add-drop-table -e test patient hospital   UM.txt

then I am trying to import data using this statement..

mysqlimport test UM.txt

It give me error for table not found...

Please guide me regarding this matter..

Thanks  Regards,

Shripal.


-
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


 




-
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: Problem with mysqlimport

2003-01-17 Thread Diana Soares
Hi, 
I didn't notice in the other e-mail, but the syntax of mysqlimport says
everything.. :-)
mysqlimport is like LOAD DATA INFILE and imports data to ONE table.
To use your UM.txt you may use:
# mysql test  UM.txt


For further explanation of mysqlimport:

# mysqlimport --help

Loads tables from text files in various formats.  The base name of the
text file must be the name of the table that should be used.


OR 

http://www.mysql.com/doc/en/mysqlimport.html

shell mysqlimport [options] database textfile1 [textfile2 ...]

For each text file named on the command-line, mysqlimport strips any
extension from the filename and uses the result to determine which table
to import the file's contents into. For example, files named
`patient.txt', `patient.text', and `patient' would all be imported into
a table named patient. 
...


On Fri, 2003-01-17 at 13:45, Shripal Shah wrote:
 Hi,
 
 I am using version 3.23.47.
 Yes, DROP TABLE COMMAND IS PERFECT.
 
 See, here I am mentioning my steps:
 
 1 mysqldump --opt test patient  UM.txt
 
 2 mysqlimport test UM.txt
 
 THEN IT GIVES ME FOLLOWING ERROR:
 
 mysqlimport: Error: Table 'test.UM' doesn't exist, when using table: UM
 
 So, this is my problem.
 
 Thanks for your immediate reply
 
 Thanks  Regards,
 
 Shripal.
 
 - Original Message -
 From: Diana Soares [EMAIL PROTECTED]
 To: Shripal Shah [EMAIL PROTECTED]
 Sent: Friday, January 17, 2003 6:48 PM
 Subject: Re: Problem with mysqlimport
 
 
  Hi,
  What version of MySQL do you use ?
  Check if the DROP TABLE command on file UM.txt looks like this:
  DROP TABLE IF EXISTS table;
 
  Also, is it a NOTE or mysqlimport really exits ? Does it create any
  table ?
 
  http://www.mysql.com/doc/en/DROP_TABLE.html
 
 
  On Fri, 2003-01-17 at 12:33, Shripal Shah wrote:
   Dear Sir/Madam,
  
   I've one data file which is built with the help of mysqldump. This file
   contains structure  data of 2 tables of test database. Like this..
  
   mysqldump -C --add-drop-table -e test patient hospital   UM.txt
  
   then I am trying to import data using this statement..
  
   mysqlimport test UM.txt
  
   It give me error for table not found...
  
   Please guide me regarding this matter..
  
   Thanks  Regards,
  
   Shripal.
  
-- 
Diana Soares


-
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




problem with mysqlimport

2002-10-18 Thread Julia Maddocks
I'm trying to import an access database table into MySQL

This is what I've done:

created a database testdb in access with a table cop
exported the table as comma separated values into cop.txt

created a database called testdb in mysql,
created a table called cop of the same structure as the access table
that works fine.

when I try this:

mysqlimport testdb cop.txt;

I get the error:

The used command is not allowed with this MySQL version when using
table: cop

any hints?

Julia



-
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: problem with mysqlimport

2002-10-17 Thread Egor Egorov

Julia,
Thursday, October 17, 2002, 2:29:57 PM, you wrote:

JM This is what I've done:

JM created a database testdb in access with a table cop
JM exported the table as comma separated values into cop.txt

JM created a database called testdb in mysql,
JM created a table called cop of the same structure as the access table
JM that works fine.

JM when I try this:

JM mysqlimport testdb cop.txt;

JM I get the error:

JM The used command is not allowed with this MySQL version when using
JM table: cop

JM any hints?

What version of MySQL are you using? Usually this error ocurs when
LOAD DATA LOCAL INFILE or mysqlimport --local are used:
 http://www.mysql.com/doc/en/LOAD_DATA_LOCAL.html



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ma02-010c
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




Re: Problem with MySQLImport utility

2002-07-01 Thread Roger Baklund

* [EMAIL PROTECTED]
 Hie
   I'm new in MySQL.anyone out there can help please?
 I'm actually experimenting with the mysqlimport utility to import
 data from
 a text file.however i'm always getting this error upon the command

 c:\mysql\binmysqlimport - - local - -fields-terminated-by=, test
 newtest.txt

 ERROR: The used command is not allowed with this MySQL version, when using
 table: newtest

 P.S. My SQL version is Ver. 11.16 Distrib 3.23.49 for Win95/98 (i32)
  Also i created a txt file with the following structure
  100,200
  200,200
  300,300
  .
  My table is newtest with 2 fields of char datatype of size 10.

From the manual:

In MySQL 3.23.49 and MySQL 4.0.2 LOCAL will only work if you have not
started mysqld with --local-infile=0 or if you have not enabled your client
to support LOCAL. See section 4.2.4 Security issues with LOAD DATA LOCAL.

(There is probably a typo here... I guess LOCAL will only work if you HAVE
enabled your client to support LOCAL... AND you have not started the server
with --local-infile=0...)

URL: http://www.mysql.com/doc/L/O/LOAD_DATA.html 
URL: http://www.mysql.com/doc/L/O/LOAD_DATA_LOCAL.html 

Beware that there was done some changes to LOAD DATA LOCAL in version
3.23.49, and some bugs was intrudused (--enable-local-infile
(and --local-infile) did not work, IIRC). These bugs was fixed in version
3.23.50.

URL: http://www.mysql.com/doc/N/e/News-3.23.49.html 
URL: http://www.mysql.com/doc/N/e/News-3.23.50.html 

--
Roger


-
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: Problem with MySQLImport utility

2002-06-26 Thread Victoria Reznichenko

ericloe,
Tuesday, June 25, 2002, 12:17:03 PM, you wrote:

e   I'm new in MySQL.anyone out there can help please?
e I'm actually experimenting with the mysqlimport utility to import data from
e a text file.however i'm always getting this error upon the command

c:\mysql\binmysqlimport - - local - -fields-terminated-by=, test
e newtest.txt

e ERROR: The used command is not allowed with this MySQL version, when using
e table: newtest

e P.S. My SQL version is Ver. 11.16 Distrib 3.23.49 for Win95/98 (i32)
e  Also i created a txt file with the following structure
e  100,200
e  200,200
e  300,300
e  .
e  My table is newtest with 2 fields of char datatype of size 10.

e Please help. Thanks.

You should start mysqld with --local-infile=1 to enable load data from
client:
   http://www.mysql.com/doc/L/O/LOAD_DATA_LOCAL.html




-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [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




Problem with MySQLImport utility

2002-06-25 Thread ericloe

Hie
  I'm new in MySQL.anyone out there can help please?
I'm actually experimenting with the mysqlimport utility to import data from
a text file.however i'm always getting this error upon the command

c:\mysql\binmysqlimport - - local - -fields-terminated-by=, test
newtest.txt

ERROR: The used command is not allowed with this MySQL version, when using
table: newtest

P.S. My SQL version is Ver. 11.16 Distrib 3.23.49 for Win95/98 (i32)
 Also i created a txt file with the following structure
 100,200
 200,200
 300,300
 .
 My table is newtest with 2 fields of char datatype of size 10.

Please help. Thanks.

Regards,
Eric.

**
NOTICE OF CONFIDENTIALITY
**
This message and any files transmitted with it may be privileged and/or
confidential and are intended only for the use of the addressee.  If you,
the reader of this message, are not the intended recipient, you should not
disseminate, distribute or copy this message. If you have received this
message in error, please notify us immediately by return email and delete
the original message. Thank you.


-
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: Problem with MySQLImport utility

2002-06-25 Thread (Borus.Kung)

you don't need space between dashes
--local  instead of - -local

Borus

 Hie
   I'm new in MySQL.anyone out there can help please?
 I'm actually experimenting with the mysqlimport utility to import data
from
 a text file.however i'm always getting this error upon the command

 c:\mysql\binmysqlimport - - local - -fields-terminated-by=, test
 newtest.txt

 ERROR: The used command is not allowed with this MySQL version, when using
 table: newtest

 P.S. My SQL version is Ver. 11.16 Distrib 3.23.49 for Win95/98 (i32)
  Also i created a txt file with the following structure
  100,200
  200,200
  300,300
  .
  My table is newtest with 2 fields of char datatype of size 10.

 Please help. Thanks.

 Regards,
 Eric.

 **
 NOTICE OF CONFIDENTIALITY
 **
 This message and any files transmitted with it may be privileged and/or
 confidential and are intended only for the use of the addressee.  If you,
 the reader of this message, are not the intended recipient, you should not
 disseminate, distribute or copy this message. If you have received this
 message in error, please notify us immediately by return email and delete
 the original message. Thank you.


 -
 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

-
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: Problem with MySQLImport utility

2002-06-25 Thread Roger Baklund

* [EMAIL PROTECTED]
   I'm new in MySQL.anyone out there can help please?
 I'm actually experimenting with the mysqlimport utility to import
 data from
 a text file.however i'm always getting this error upon the command

 c:\mysql\binmysqlimport - - local - -fields-terminated-by=, test
 newtest.txt

You should not have spaces between the '-' characters...:

mysqlimport --local --fields-terminated-by=, test newtest.txt

...but I'm not sure if this is the reason of the error message you get... I
get Error: Unknown database '-' when I try your command with the spaces
between the '-' characters.
(win2k, 3.23.30-gamma)

--
Roger


-
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