[fixed] The used command not allowed with this MySQL version

Web、Mail、Ftp、DNS、Proxy、VPN、Samba、LDAP 等基础网络服务
回复
bluebirdshao
帖子: 186
注册时间: 2007-11-26 12:05

[fixed] The used command not allowed with this MySQL version

#1

帖子 bluebirdshao » 2013-01-05 16:59

我在看 MySQL 的官方文档, MySQL 5.5 Manual
安装的 MySQL 是 5.5.28-0ubuntu0.12.04.3

里面有个例子:

代码: 全选

mysql> LOAD DATA LOCAL INFILE '/path/pet.txt' INTO TABLE pet;
可是在我的机器上运行得到的结果却是:

代码: 全选

mysql> LOAD DATA LOCAL INFILE 'pet.txt' INTO TABLE pet;
ERROR 1148 (42000): The used command is not allowed with this MySQL version
求解!
上次由 bluebirdshao 在 2013-01-05 18:24,总共编辑 1 次。
bluebirdshao
帖子: 186
注册时间: 2007-11-26 12:05

Re: The used command not allowed with this MySQL version

#2

帖子 bluebirdshao » 2013-01-05 17:02

有 pet.txt 这个官方文件并且运行 mysql 的当前目录就是存放文件的地方。
所以是能够找到 pet.txt 这个文件的。因为它能够运行

代码: 全选

mysql> SOURCE cr_pet_tbl.sql
这个命令。
bluebirdshao
帖子: 186
注册时间: 2007-11-26 12:05

Re: The used command not allowed with this MySQL version

#3

帖子 bluebirdshao » 2013-01-05 17:50

原来 Manual 下面的 User Comments 已经有解决方案了:

With a default installation from FreeBSD ports, I had to use the command line:

代码: 全选

mysql -u user -p --local-infile menagerie
to start the MySQL monitor, else the LOAD DATA LOCAL command failed with an error like follow:

代码: 全选

ERROR 1148 (42000): The used command is not allowed with this MySQL version
回复