LOAD DATA INFILE Problem

2011-11-10 Thread spikerlion
Hello,

after switching from MySQL 5.0.67 to 5.1.59 we get the following problem:

We want to import data from a textfile 
example of the textfile:
t...@test.com$yes$432145$xyz

The command is: LOAD DATA LOCAL INFILE 'textfile.txt' INTO TABLE TESTTABLE 
FIELDS TERMINATED BY '$';

Selecting the data from the TESTTABLE by select * from TESTTABLE; the data in 
the first field looks like |test.com, if I do a select * from TESTTABLE\G I 
can see t...@test.com in the first field.

Are there any changes between MySQL 5.0 and 5.1 ?


Best Regards
Spiker
-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Charset and LOAD DATA INFILE problem

2005-04-11 Thread Duan Pavlica
Hello,

I'm trying to convert tables from Paradox DBs to MySQL and I have a big problem 
with setting correct character set. I created small application which generates 
csv files which are in cp1250 (I can't change it, it's charset ofmy Paradox 
DBs). My databases and tables in MySQL are in latin2. I tried in MySQL client 
command SET NAMES cp1250 and then LOAD DATA INFILE but that didn't help. Some 
chars were screwed up. If I create SQL script from part of csv file and load it 
by command SOURCE 'script.sql' then everything is OK.
So, does anybody know the way how to import files from CSV directly by LOAD 
DATA INFILE without difficult manual conversions to sql scripts?

Thanks in advance for any help or ideas.

Dusan Pavlica

Re: Charset and LOAD DATA INFILE problem - solved

2005-04-11 Thread Duan Pavlica
Finally I found the solution.
Just short note for everybody who has problem with LOAD DATA INFILE and 
correct charset of the file. Loaded file must have SAME charset as DATABASE 
which contains target table of LOAD DATA command. Target table charset 
doesn't matter. I didn't find any note about it in manual but I think it is 
useful to know it.

Dusan
- Original Message - 
From: Duan Pavlica [EMAIL PROTECTED]
To: list mysql mysql@lists.mysql.com
Sent: Monday, April 11, 2005 10:52 AM
Subject: Charset and LOAD DATA INFILE problem

Hello,
I'm trying to convert tables from Paradox DBs to MySQL and I have a big 
problem with setting correct character set. I created small application 
which generates csv files which are in cp1250 (I can't change it, it's 
charset ofmy Paradox DBs). My databases and tables in MySQL are in latin2. I 
tried in MySQL client command SET NAMES cp1250 and then LOAD DATA INFILE but 
that didn't help. Some chars were screwed up. If I create SQL script from 
part of csv file and load it by command SOURCE 'script.sql' then everything 
is OK.
So, does anybody know the way how to import files from CSV directly by LOAD 
DATA INFILE without difficult manual conversions to sql scripts?

Thanks in advance for any help or ideas.
Dusan Pavlica 

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


Re: load data infile problem

2003-08-05 Thread Cybot
Montagna, Dan wrote:

Hello, 
I'm a very new mysql/php user and am trying to use the load data infile
command without luck.  I'd like to replace a table using a text file but
can't get it to work.  I set up a test table with no records using a telnet
console.  I'm trying to write a php page that takes the file on the server
and adds the info into the table.  Here's my code:
 
?php
 
# Connect to the database
$db = mysql_connect(server.net, username,password);
mysql_select_db(elasticnature,$db);
 
# Delete the current content of the table
$result = mysql_db_query('$sql_id',DELETE FROM tablename) or die (Invalid
DELETE query);
do you have a table called 'tablename' ? i guess not!

 
# Optimize the current table (recover empty space)
$result = mysql_db_query('$sql_id',OPTIMIZE TABLE tablename) or die
(Invalid OPTIMIZE query);
 
# Load local comma separated, fields enclosed by quotes text database - File
has to be in the same directory of this file
$result = mysql_db_query('$sql_id',LOAD DATA  INFILE 'file.txt' INTO TABLE
tablename FIELDS TERMINATED BY ',' ENCLOSED BY '\') or die (Invalid DATA
LOAD query);
 
# Get how many records are present in the table now
$result = mysql_db_query('$sql_id',SELECT * from uploadtable) or die
(Invalid SELECT query);
$rows_count = mysql_num_rows($result);
 
echo Records: $rows_count; mysql_free_result($result);
?
 
I got this from an example given online and the output is the invalid
delete query.   What's wrong with this code??  Thanks for any help...


--
Sebastian Mendel
www.sebastianmendel.de
www.tekkno4u.de
www.nofetish.com
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: load data infile problem

2003-08-05 Thread Montagna, Dan
I'm using some default table names and such here...my actual code has the
appropriate table, server, un, pw etc...
 


load data infile problem

2003-08-05 Thread Montagna, Dan
Hello, 
I'm a very new mysql/php user and am trying to use the load data infile
command without luck.  I'd like to replace a table using a text file but
can't get it to work.  I set up a test table with no records using a telnet
console.  I'm trying to write a php page that takes the file on the server
and adds the info into the table.  Here's my code:
 
?php
 
# Connect to the database
$db = mysql_connect(server.net, username,password);
mysql_select_db(elasticnature,$db);
 
# Delete the current content of the table
$result = mysql_db_query('$sql_id',DELETE FROM tablename) or die (Invalid
DELETE query);
 
# Optimize the current table (recover empty space)
$result = mysql_db_query('$sql_id',OPTIMIZE TABLE tablename) or die
(Invalid OPTIMIZE query);
 
# Load local comma separated, fields enclosed by quotes text database - File
has to be in the same directory of this file
$result = mysql_db_query('$sql_id',LOAD DATA  INFILE 'file.txt' INTO TABLE
tablename FIELDS TERMINATED BY ',' ENCLOSED BY '\') or die (Invalid DATA
LOAD query);
 
# Get how many records are present in the table now
$result = mysql_db_query('$sql_id',SELECT * from uploadtable) or die
(Invalid SELECT query);
$rows_count = mysql_num_rows($result);
 
echo Records: $rows_count; mysql_free_result($result);
?
 
I got this from an example given online and the output is the invalid
delete query.   What's wrong with this code??  Thanks for any help...
Dan


Load Data Infile problem.

2003-02-14 Thread Webmaster MBT
Hi List.

I have been working on a problem that is driving me crazy.

I have to create a process in which I upload some info to a table. Since I
have to add some different information to that table, I decided to do it
like this.

1.I create a temporary table copying the structure of my final table. I.E.
$query_temp_table=CREATE TEMPORARY TABLE tguias SELECT * FROM guias WHERE
1=0;
$temp_table=mysql_query($query_temp_table, $cosmo_logistic) or
die(mysql_error());
I do this in PHP.
It works fine It seems.
2. I populate the temporary table.
$query_populate_tguias=LOAD DATA LOCAL INFILE
'c:/cosmo/www/upload/guias.txt' INTO TABLE tguias FIELDS TERMINATED BY ','
ENCLOSED BY '\'
(cliente,asesora,extra1,peso,albaran,gerente,tipo,imprimir);
$populate_tguias=mysql_query($query_populate_tguias, $cosmo_logistic) or
die(mysql_error());
3. Then I pass the information along with some other variables to the real
table.
mysql_select_db($database_cosmo_logistic, $cosmo_logistic);
$query_poblar = SELECT * FROM tguias;
$poblar = mysql_query($query_poblar, $cosmo_logistic) or die(mysql_error());
$row_poblar= mysql_fetch_assoc($poblar);
$totalRows_poblar= mysql_num_rows($poblar);
   do { 
mysql_select_db($database_cosmo_logistic, $cosmo_logistic);
$query_poblar_guias=INSERT INTO guias
(cliente,asesora,peso,albaran,gerente,tipo,imprimir,manifiesto,Status)
VALUES
(\.$row_poblar['cliente'].\,\.$row_poblar['asesora'].\,.$row_poblar
['peso'].,\.$row_poblar['albaran'].\,\.$row_poblar['gerente'].\,\
.$row_poblar['tipo'].\,.$row_poblar['imprimir'].,\.$manifiesto.\,\A
\);
$poblar_guias=mysql_query($query_poblar_guias, $cosmo_logistic) or
die(No pude insertar el registro .mysql_error());
} while ($row_poblar=mysql_fetch_assoc($poblar));?

with this source file:
13DAN010,D79406,13DAN010, 1 ,20430002201,75301;753,PAQUETE,1
13DAN010,D55816,13DAN010, 1.32
,20430003101,100201;1002,PAQUETE,1

it Does not work at all. I wonder if it is because it has a . in the number
even as the field receiving it is a decimal(10,2) or if it is because in one
of the field I have ;. 

The thing is that it will import one, and skip one full record each time.
But the one it inserts, is correctly inserted with the ; and the decimal
point correct. Any idea why it might be pasing one row and adding one?

This is driving me crazy.

When I do this same procedure on another table with source code like: 
D79427,LOPEZ DURAN ELISA,ACUEDUCTO TARRAGONA 59,15,PASEOS DEL
BOSQUE,NAUCALPAN,53297, ,LOPEZ DURAN ELISA,,F,T

it Works correctly even as it has two false or true fields.







-
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: Re: Load Data Infile problem.

2003-02-14 Thread Paul DuBois
The thing is that it will import one, and skip one full record each time.
But the one it inserts, is correctly inserted with the ; and the decimal
point correct. Any idea why it might be pasing one row and adding one?


This is typically a problem of not having the line-ending terminator
specified correctly.  What's the line-ending sequence that you're
using in your file?


sql, query

-
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: Re: Load Data Infile problem.

2003-02-14 Thread Paul DuBois
At 16:53 -0600 2/14/03, Webmaster MBT wrote:

Haven't been able to identify it yet... I'm attaching the file so maybe
someone can help me with this.


Well, it's your data file.  You should know what the line terminators are.



BTW, how do I tell the command what is the ending symbol?


Add a LINES TERMINATED BY clause at the appropriate spot in the LOAD
DATA statement.  Common ones are:

For newlines (common on Unix):

LINES TERMINATED BY '\n'

For carriage returns (common on Mac OS):

LINES TERMINATED BY '\r'

For carriage return/linefeed pairs (common on DOS/Windows):

LINES TERMINATED BY '\r\n'

Note that you may need to double the \ characters to get them passed
through PHP properly to MySQL.


Thanks in advance.

-Mensaje original-
De: Paul DuBois [mailto:[EMAIL PROTECTED]]
Enviado el: Viernes, 14 de Febrero de 2003 04:43 p.m.
Para: [EMAIL PROTECTED]
Asunto: Re: Re: Load Data Infile problem.


The thing is that it will import one, and skip one full record each time.
But the one it inserts, is correctly inserted with the ; and the decimal
point correct. Any idea why it might be pasing one row and adding one?


This is typically a problem of not having the line-ending terminator
specified correctly.  What's the line-ending sequence that you're
using in your file?

sql, query



-
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: LOAD DATA INFILE problem

2002-10-13 Thread Tim Johnson

* Clayburn W. Juniel, III [EMAIL PROTECTED] [021012 07:30]:
 I am attempting to delete a table from a database,
 then recreate it and load data into the table.
 The drop and create commands are working properly,
 here's a screen dump:
..
 mysql LOAD DATA INFILE 
 /home/http/run/isak/wmj-new/uploaded/testthis.txt INTO TABLE 
 testthis;
 ERROR 1045: Access denied for user: 
 '[EMAIL PROTECTED]' (Using password: YES)
 
 The same error message is generated if I give the filename only, 
 logging
 in from the working directory of the file.
...
 In Unix systems the mysql user needs file privileges to file to be 
 loaded.  It's probably simplest to have the file located on a local 
 disk (not network shared) with privileges for all to read.

 Thanks!: I had guessed that... and was having the same error message
 when trying to load via CGI. Time to talk to the sysadmin

 My thanks to all.
-- 
Tim Johnson [EMAIL PROTECTED]
  http://www.alaska-internet-solutions.com
  http://www.johnsons-web.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: LOAD DATA INFILE problem

2002-10-12 Thread Egor Egorov

Tim,
Saturday, October 12, 2002, 1:21:59 AM, you wrote:

TJ I am attempting to delete a table from a database,
TJ then recreate it and load data into the table. 
TJ The drop and create commands are working properly, 
TJ here's a screen dump:

TJ mysql DROP TABLE IF EXISTS testthis;
TJ Query OK, 0 rows affected (0.16 sec)

TJ mysql CREATE TABLE testthis(ID INT DEFAULT '0',Reviews CHAR (50),Date 
DATE,Bookmark CHAR (50),
TJ - Title CHAR (90),Web_Page CHAR (50));
TJ Query OK, 0 rows affected (0.16 sec)

TJ mysql LOAD DATA INFILE /home/http/run/isak/wmj-new/uploaded/testthis.txt INTO 
TABLE testthis;
TJ ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' 
(Using password: YES) 

TJ The same error message is generated if I give the filename only, logging
TJ in from the working directory of the file.

TJ 1)Any ideas of what I may be doing wrong here?
TJ 2)Also, can anyone tell me where I can find a list of MySQL error codes?
TJ   Understanding more of what ERROR 1045 is about might be helpful

User must have FILE privilege to use LOAD DATA INFILE.



-- 
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




LOAD DATA INFILE problem

2002-10-12 Thread Tim Johnson

Hello All:
I am attempting to delete a table from a database,
then recreate it and load data into the table. 
The drop and create commands are working properly, 
here's a screen dump:

mysql DROP TABLE IF EXISTS testthis;
Query OK, 0 rows affected (0.16 sec)

mysql CREATE TABLE testthis(ID INT DEFAULT '0',Reviews CHAR (50),Date DATE,Bookmark 
CHAR (50),
- Title CHAR (90),Web_Page CHAR (50));
Query OK, 0 rows affected (0.16 sec)

mysql LOAD DATA INFILE /home/http/run/isak/wmj-new/uploaded/testthis.txt INTO TABLE 
testthis;
ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using 
password: YES) 

The same error message is generated if I give the filename only, logging
in from the working directory of the file.

1)Any ideas of what I may be doing wrong here?
2)Also, can anyone tell me where I can find a list of MySQL error codes?
  Understanding more of what ERROR 1045 is about might be helpful

this is server version: 3.23.51
TIA
-- 
Tim Johnson [EMAIL PROTECTED]
  http://www.alaska-internet-solutions.com
  http://www.johnsons-web.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: LOAD DATA INFILE problem

2002-10-12 Thread Clayburn W. Juniel, III


On Friday, Oct 11, 2002, at 15:21 America/Phoenix, Tim Johnson wrote:

 Hello All:
 I am attempting to delete a table from a database,
 then recreate it and load data into the table.
 The drop and create commands are working properly,
 here's a screen dump:

 mysql DROP TABLE IF EXISTS testthis;
 Query OK, 0 rows affected (0.16 sec)

 mysql CREATE TABLE testthis(ID INT DEFAULT '0',Reviews CHAR (50),Date 
 DATE,Bookmark CHAR (50),
 - Title CHAR (90),Web_Page CHAR (50));
 Query OK, 0 rows affected (0.16 sec)

 mysql LOAD DATA INFILE 
 /home/http/run/isak/wmj-new/uploaded/testthis.txt INTO TABLE 
 testthis;
 ERROR 1045: Access denied for user: 
 '[EMAIL PROTECTED]' (Using password: YES)

 The same error message is generated if I give the filename only, 
 logging
 in from the working directory of the file.

 1)Any ideas of what I may be doing wrong here?
 2)Also, can anyone tell me where I can find a list of MySQL error 
 codes?
   Understanding more of what ERROR 1045 is about might be helpful

In Unix systems the mysql user needs file privileges to file to be 
loaded.  It's probably simplest to have the file located on a local 
disk (not network shared) with privileges for all to read.

--
Clayburn W. Juniel, III
Phone: (602) 326-7707
Email: [EMAIL PROTECTED]
http://EffectiveSoftwareSolutions.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: load data infile --- problem

2002-08-13 Thread LR P

thanx 4 your reply:


this is the error message that i got when i tried using the full pathname.

mysql LOAD DATA INFILE /home/ihot/member.txt INTO TABLE member;
ERROR 13: Can't get stat of '/home/ihot/member.txt' (Errcode: 13)
mysql

i've tried using another user account (of course i've set all the permission 
using GRANT statement), but it didn't work either.

this is my current directory looks like:

[ihot@localhost ihot]$ ll
total 72
-rwxr-xr-x1 ihot root 5882 Jun 12 12:18 bestrock.playlist
-rw-rw-r--1 ihot ihot   32 Aug 12 16:18 imptest.txt
-rw-r--r--1 root root   32 Aug 12 17:01 imptest.txt1
-rw-rw-r--1 ihot ihot   31 Aug 12 16:06 member.txt
-rw-rw-r--1 ihot ihot   40 Aug 12 16:01 student.txt
-rw-r--r--1 root root   40 Aug 12 16:53 student.txt1

anyway, thanx 4 your help...
i'll try to figure it out, how this thing happens. (time will tell) 8-)

thank u


From: Paul DuBois [EMAIL PROTECTED]

=== cut 

When you don't use LOCAL, the server is the one reading the file, not
the client.  The server has no idea what your current directory is.
Try using the full pathname.  (Note that this will still fail unless
the file is readable to the user that the server runs as.)





_
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


-
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: load data infile --- problem

2002-08-13 Thread Paul DuBois

At 22:21 + 8/13/02, LR P wrote:
thanx 4 your reply:


this is the error message that i got when i tried using the full pathname.

mysql LOAD DATA INFILE /home/ihot/member.txt INTO TABLE member;
ERROR 13: Can't get stat of '/home/ihot/member.txt' (Errcode: 13)
mysql

% perror 13
Error code  13:  Permission denied

Looks like the server cannot read your file.  What are the permissions
on your home directory?


i've tried using another user account (of course i've set all the 
permission using GRANT statement), but it didn't work either.

this is my current directory looks like:

[ihot@localhost ihot]$ ll
total 72
-rwxr-xr-x1 ihot root 5882 Jun 12 12:18 bestrock.playlist
-rw-rw-r--1 ihot ihot   32 Aug 12 16:18 imptest.txt
-rw-r--r--1 root root   32 Aug 12 17:01 imptest.txt1
-rw-rw-r--1 ihot ihot   31 Aug 12 16:06 member.txt
-rw-rw-r--1 ihot ihot   40 Aug 12 16:01 student.txt
-rw-r--r--1 root root   40 Aug 12 16:53 student.txt1

anyway, thanx 4 your help...
i'll try to figure it out, how this thing happens. (time will tell) 8-)

thank u

From: Paul DuBois [EMAIL PROTECTED]

=== cut 

When you don't use LOCAL, the server is the one reading the file, not
the client.  The server has no idea what your current directory is.
Try using the full pathname.  (Note that this will still fail unless
the file is readable to the user that the server runs as.)





_
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


-
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




load data infile --- problem

2002-08-12 Thread LR P

hi all,


i have a problem with load data... statement. i'm using MySQL 3.23.49 from 
RedHat 7.3. i read Paul DuBois book about MySQL, and tried to load data to 
my member table,
mysql LOAD DATA INFILE member.txt INTO TABLE member;
but i didn't work.

i've tried by removing the 'local', but it gave me same error message,
ERROR 1045: Access denied for user: 'ihot@localhost' (Using password: YES)

i've given permission to user 'ihot' (from root), by using:
mysql GRANT ALL ON samp_db.* TO ihot@localhost IDENTIFIED BY ***

but still, it didn't work...


Any idea, guys?


Thanx 4 your help.

_
Chat with friends online, try MSN Messenger: http://messenger.msn.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: load data infile --- problem

2002-08-12 Thread Paul DuBois

At 2:16 + 8/13/02, LR P wrote:
hi all,


i have a problem with load data... statement. i'm using MySQL 
3.23.49 from RedHat 7.3. i read Paul DuBois book about MySQL, and 
tried to load data to my member table,
mysql LOAD DATA INFILE member.txt INTO TABLE member;
but i didn't work.

What was the error with LOCAL included?


i've tried by removing the 'local', but it gave me same error message,
ERROR 1045: Access denied for user: 'ihot@localhost' (Using password: YES)

When you remove LOCAL, then the file must be read by the server, in which
case you need the FILE privilege.


i've given permission to user 'ihot' (from root), by using:
mysql GRANT ALL ON samp_db.* TO ihot@localhost IDENTIFIED BY ***

You'll need GRANT FILE ON *.* TO ihot@localhost; to give yourself
the FILE privilege.


but still, it didn't work...

Any idea, guys?


-
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




Load Data infile problem

2002-07-02 Thread Martin Scherer

I am trying to import a text file that is tab delimited.

I am using the following , but it only returns one line.

LOAD DATA INFILE '/Users/martinsc/documents/jillslist.txt' INTO TABLE 
Customers FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\n';

Why would it do one line and then stop?  MySQL indicates one line affected.
The database is not empty and at first I suspected that the import 
stopped due to the same Customer_ID but that is not the case  as the 
ID's for the first records do not exist in the database as they were 
deleted records.

Thank you
Martin

-- 
Failure is an editorial judgement imposed by others

-
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




Load data infile problem

2002-07-01 Thread Martin Scherer

I am trying to import a text file that is tab delimited.

I am using the following , but it only returns one line.

LOAD DATA INFILE '/Users/martinsc/documents/jillslist.txt' INTO TABLE 
Customers FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\n';

Why would it do one line and then stop?  MySQL indicates one line affected.
The database is not empty and at first I suspected that the import 
stopped due to the same Customer_ID but that is not the case  as the 
ID's for the first records do not exist in the database as they were 
deleted records.

Thank you
Martin

-- 
Failure is an editorial judgement imposed by others

-
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




LOAD DATA INFILE Problem

2002-01-19 Thread johnlucas-Arluna

Stupid problem this one no doubt.

I have a find in mysql\bin called words.txt

The file contains tab separated values with a newline character at the end:

225 20  Residence   73.563.580  187.5
225 20  Planibel195.5   63.579.5289

When I do

LOAD DATA LOCAL INFILE words.txt INTO TABLE tblftpagewordpos

I get lots of warnings and when I query the table, the values are all zeros
(when I have a default value set)

I am no doubt doing something stupid, but it is doing my head in now.

Any help really appreciated.

Many thanks

John.





-
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: LOAD DATA INFILE Problem

2002-01-19 Thread johnlucas-Arluna


Sorry, my fault, realised the file I was writing for VB was cocking it up.

I was adding chr(13) at the end, but the FileSystemObject write method
seemed to be putting the carriage return in too, so MYSQL didn't get the
newline character.

I changed to use the Print command in VB instead just writing Chr(13) at the
end of the line, and it works.

Hope that helps somebody else, just took me HOURS to figure it out.

Well, I will remember it next time!!!

Bye for now

-Original Message-
From: johnlucas-Arluna [mailto:[EMAIL PROTECTED]]
Sent: 19 January 2002 20:47
To: [EMAIL PROTECTED]
Subject: LOAD DATA INFILE Problem


Stupid problem this one no doubt.

I have a find in mysql\bin called words.txt

The file contains tab separated values with a newline character at the end:

225 20  Residence   73.563.580  187.5
225 20  Planibel195.5   63.579.5289

When I do

LOAD DATA LOCAL INFILE words.txt INTO TABLE tblftpagewordpos

I get lots of warnings and when I query the table, the values are all zeros
(when I have a default value set)

I am no doubt doing something stupid, but it is doing my head in now.

Any help really appreciated.

Many thanks

John.





-
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