I am trying to use mysql load via the shell prompt. I want to load a CSV file directly into the database.
mysql -u root -p -h mysql -e "LOAD DATA INFILE 'Subscriber.csv' INTO TABLE temp_data FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n'IGNORE 1 ROWS" psi
I am getting the error ERROR 1083 (42000) at line 1: Field separator argument is not what is expected
Below is my CSV file
misdn,city,age,gender
771XXXXXX,MUTOKO,24,MALE
771XXXXXX,MUTOKO,32,MALE
771XXXXXX,MUTOKO,37,Male
771XXXXXX,MUTOKO,36,MALE
771XXXXXX,MUTOKO,25,Male
771XXXXXX,HWEDZA,26,MALE
771XXXXXX,HWEDZA,33,MALE
771XXXXXX,MUTOKO,26,MALE
771XXXXXX,HWEDZA,34,MALE
771XXXXXX,HWEDZA,34,MALE
771XXXXXX,MUTOKO,21,MALE
771XXXXXX,MUTOKO,22,MALE
771XXXXXX,MUTOKO,30,MALE
771XXXXXX,MUTOKO,28,Male
771XXXXXX,MUTOKO,33,Male
771XXXXXX,MUTOKO,23,Male
771XXXXXX,ZVISHAVANE,31,Male
771XXXXXX,ZVISHAVANE,39,MALE
Please help, what I am doing wrong?