0

I want to import data from a file into the mysql through command line only. I am using the following command but getting the following error.

Mysql>load data infile '/root/data.txt' into table test.emp fields terminated by ',' lines terminated by '\n'; ERROR 13 (HY000): Can't get stat of '/root/data.txt' (Errcode: 13)

Table structure is:

Emp_ID int

Emp_name varchar

Emp_city varchar

Content of data.txt

1,abc,London

2,def,Alberta

3,hjk,Toronto

Could somebody will help me on this how to do this via command line or any other way out?

gurpreet
  • 13
  • 3

0 Answers0