如何将格式化的文本文件导入mysql数据库

问题描述:

使用Mac终端,当文本文件具有这种格式时,如何填充mysql数据库.

sing the Mac terminal, how could you populate a mysql database when the text file has a format like this.

00000,1284
00001,2081

我已经创建了数据库表来反映该数据,但是我不确定如何导入这种格式的文本文件.

I have created the database table to reflect that data however I am not sure on how to import a text file with this type of format..

这是我现在正在尝试使用的方法,但是它不起作用

This is what I am trying to use right now but its not working

LOAD DATA INFILE 'Developer/Shared Files/NIS.txt INTO TABLE nisC FIRLDS TERMINATED BY ',';

使用以下语句

LOAD DATA INFILE 'Developer/Shared Files/NIS.txt' INTO TABLE nisC (field1, field2);