Loading Customer Users from file - MySQL error

Moderator: crythias

Post Reply
Gunz
Znuny newbie
Posts: 44
Joined: 30 Jun 2010, 01:43
Znuny Version: 2.4

Loading Customer Users from file - MySQL error

Post by Gunz »

Hi, I've been testing doing a bulk load of customer users from text file.

It's working ok except for two things: a MySQL error I don't understand and the fact I can't seem to load passwords.

Here is what I've done:

1) Created an import file. Here's the first couple of lines of my import file:-

Allan Goodie agoodie@gunz.com agoodie@gunz.com hello 12 1
Albert Tan atan@gunz.com atan@gunz.com hello 13 1


The file contains... first name | last name | login | email address | password | customer_ID | valid_ID

I want them to use their email address as their login.

I went into the Customer::Auth module and checked the following settings:
DB::Table: is set to "customer_user"
DB::CustomerKey: is set to "login"
DB::CustomerPassword: is set to "pw"

2) I then logged into MySQL as root and run the following code:

load data infile 'otrs_cust.txt' into table customer_user
fields terminated by '\t' lines terminated by '\r' (first_name,
last_name, login, email, pw, customer_id, valid_id);


Here is the MySQL error I get:-

Error 1062 (23000): Duplicate entry ‘ ‘ for key 2

As well the password "pw" doesn't inport - i.e. the "hello" in the file for the password doesn't get imported into each row.

Everything else works fine. Each customer user is created and if I manually go in the give them a password, they can login fine via the Customer interface.

I'm not sure what the issues are here with this SQL error and the password import failure. I'd appreciate your help and insight!

Thanks Wayne
Post Reply