Hi !

If off-topic, forgive me, please.

Environment:
Win98 / mysql3.23.42-max / mm.mysql-2.0.7 / jdk1.3.1

Description:
I'm trying to load data from file to table using following query:

LOAD DATA LOCAL INFILE 'C:\\WINDOWS\\TEMP\\rec222.txt'
INTO TABLE ext_call_info_ip FIELDS TERMINATED BY '\t' IGNORE 1 LINES
(id, pin, ani, phone_number, extended_reason_code,
duration, dialed_number, service_code, total_units,
start_time, disconnect_reason);

It works fine when I'm doing this in mysql client.

But whan I'm trying to do it from java class:

Statement st = db.connection.createStatement();
String query =
  "LOAD DATA LOCAL INFILE 'C:\\\\WINDOWS\\\\TEMP\\\\rec222.txt'"
  + " INTO TABLE ext_call_info_ip FIELDS TERMINATED BY '\t' IGNORE 1 
LINES"
  + " (id, pin, ani, phone_number, extended_reason_code,
  + " duration, dialed_number, service_code, total_units,"
  + " start_time, disconnect_reason)";
st.executeUpdate( query );

I got:
SQLException: Invalid authorization specification: Access denied for 
user: 'xxx@localhost' (Using password: YES)

In both situations I'm doing it on thesame user (xxx@localhost).

When I'm trying to do it in java, but with user root@localhost, I got 
no exception, but 0 records are loaded.

Question:
1) How can I use LOAD DATA LOCAL INFILE ... with java ?
2) Why this exception (access denided) ?

-----
Paweł Szczerba
mailto:[EMAIL PROTECTED]
+48 603 651 731


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

Reply via email to