List:General Discussion« Previous MessageNext Message »
From:Lucia DeMeester Date:May 20 2002 5:00am
Subject:LOAD DATA FROM FLAT FILE (InnoDB Table)
View as plain text  
Background: I tried to load data from a flat file.  The flat file contains
one line of heading data.  It is comma delimited and line separate by line
feed.  I log on as root to do the load.  Here is my result.
[ldemeester@bidshiftdev ldemeester]$ mysql -u root -p test <USER_TABLE.txt
Enter password:
ERROR 2013 at line 1: Lost connection to MySQL server during query

The following is my USER_TABLE.txt file:[ldemeester@bidshiftdev ldemeester]$
cat USER_TABLE.txt
LOAD DATA
LOCAL INFILE '/home/ldemeester/USER_TABLE.csv'
INTO TABLE USER_TABLE
FIELDS TERMINATED BY ','
LINES TERMINATED BY '\n'
IGNORE 1 LINES
(
ID,
USERNAME,
PASSWORD,
EMAIL,
PASSWORD_HINT,
PRINCIPAL_ID,
UNIT_LOCATION_ID,
POSITION_TYPE_ID
);


Questions:
1) Where can I find the error messages?  My server is Linux.
I bought a book called core MYSQL - The serious developer's Guide.  I don't
think this is for the DBA.  Are there better books for the mysql DBA?
2) What did I do wrong?  Since root has File_priv it should be able to read
the file.

I also would appreciate anyone send me a cron job backup script to do the
backup on Innodb.

Thanks very much.

Lucia DeMeester
New Media Merchants
Senior Oracle DBA
858-882-8500 ext. 2314


Thread
LOAD DATA FROM FLAT FILE (InnoDB Table)Lucia DeMeester20 May