MySQL ERROR : The used command is not allowed with this MySQL version 解决办法

目的:向MySql数据库导入.txt文件,通过load命令来实现

 

输入如下命令,报错:

 

 

修改命令,依旧报错:

 

可能原因(from mysql reference manual):

If LOAD DATA LOCALis disabled, either in the server or the client, a client that attempts to issue such a statement receives the fol-lowing error message:

ERROR 1148: The used command is not allowed with this MySQL version
可见,出于安全考虑,默认是不允许从client host远程通过load data命令导数据的
 
解决办法:

登录MySql时,需用--local-infile[=1]显式指定参数

 

问题解决

 

posted @ 2015-04-06 15:56  tinylcy  阅读(5533)  评论(0编辑  收藏  举报