I have a big myfile.csv file that looks like this
From this file I want to import some columns and obivously rows and its relevant data into mysql database phpmyadmin.
This file is located on my local computer, I want to import some columns,rows with data from that file to my live database.
Here is what I have tried after searching google.
I created a table with following columns
id name email
Then tried to run the following query in my live database
LOAD DATA LOCAL INFILE '/tmp/myfile.csv' INTO TABLE registration_no
FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\n'
(@col1,@col2,@col3) set id=@col1,name=@col2,email =@col3
Note
myfile.csv is located on my computer, in C: drive.
Am I running the correct query,is the path /tmp/myfile.csv is correct ?
Query runs but the data isn't loaded into my live DB, please help me, I've spent one and half day figuring this out .
I have read this.
