Mysql 需要'的指导;加载数据填充';

Mysql 需要'的指导;加载数据填充';,mysql,linux,Mysql,Linux,我创建了一个名为“/root/jyoti/test.txt”的文件,其中包含以下内容: tail /root/jyoti/test.txt 20,'Daily','Complete' 21,'Daily','Complete' 22,'Daily','in-progress' 然后尝试按照下面的查询加载mysql表中的数据,并说“test” mysql> select * from test; +----+-----------+------------+ | id | testname

我创建了一个名为“/root/jyoti/test.txt”的文件,其中包含以下内容:

tail /root/jyoti/test.txt
20,'Daily','Complete'
21,'Daily','Complete'
22,'Daily','in-progress'
然后尝试按照下面的查询加载mysql表中的数据,并说“test”

mysql> select * from test;
+----+-----------+------------+
| id | testname  | testtype   |
+----+-----------+------------+
|  2 | Daily     | Complete   |


mysql> load data infile '/root/jyoti/test.txt' into table accounts fields terminated by ',' (id,testname,testtype);
ERROR 13 (HY000): Can't get stat of '/root/jyoti/test.txt' (Errcode: 13)
在另一篇文章中,我发现有人建议使用“加载数据本地填充”而不是“加载数据填充”,但这也失败了,出现了错误

mysql> load data local infile '/root/jyoti/test.txt' into table accounts fields terminated by ',' (id,testname,testtype);
ERROR 1148 (42000): The used command is not allowed with this MySQL version
我正在使用以下MySql版本:-

mysql -V
mysql  Ver 14.14 Distrib 5.5.37, for debian-linux-gnu (x86_64) using readline 6.2
cat /etc/issue
Debian GNU/Linux 7 \n \l
该文件具有以下权限:

stat /root/jyoti/test.txt
  File: `/root/jyoti/test.txt'
  Size: 67              Blocks: 8          IO Block: 4096   regular file
Device: de00b6d1h/3724588753d   Inode: 554931      Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2014-06-16 12:33:34.122226597 +0530
Modify: 2014-06-16 12:33:34.122226597 +0530
Change: 2014-06-16 12:33:34.488226595 +0530
 Birth: -

您可以通过以下方式启用加载本地文件:

--local-infile=1

当您启动mysql客户端时。默认情况下,它通常是禁用的。

您能告诉我执行此操作的确切步骤吗。任何工作片段都会更有帮助。我尝试使用选项--local infle=1登录mysql,但仍然没有帮助。