November 4th, 2013, 06:27 AM
Problem with LOAD DATA INFILE
I'm completely new to MySQL and have a problem now with LOAD DATA INFILE. There is a .csv file containing a table of the following form (5 colloms, a space character seperates the colloms):
My aim is to import this in a table in a database in MySQL.
At first I created a database, called database1 and chooses it with USE. Next, I created a table with the following command:
CREATE TABLE table1 (id1 long, number1 float, number2 float, date1 datetime, name1 varchar(100))
Is this correct so far? Is the datatype 'datetime' the correct one for e.g. '2012-05-05T21:45:22Z'
Now I wanted to fill this table with a file:
LOAD DATA INFILE '/home/aaa/bbb/ccc/clientdata.csv' INTO TABLE table1;
but I get the following error:
ERROR 29 (HY000): File '/home/aaa/bbb/ccc/clientdata.csv/clientdata.csv not found (Errcode: 13)
So where is my mistake? I hope you can help me, because I have no idea what else I can try what I havn't already tried out.
November 4th, 2013, 07:30 AM
So what did you try out? A quick Google search brings up plenty of suggestions.
Originally Posted by tiemoe