目的:向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]顯式指定參數

問題解決
