MySQL中LOAD DATA INFILE出现The used command is not allowed with this MySQL version问题

运行Load data local infile命令时:

mysql> LOAD DATA LOCAL INFILE '/path/pet.txt INTO TABLE tablename;
出现:

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

解决:

输入:show global variables like 'local_infile';

+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| local_infile | OFF |
+---------------+-------+

然后:mysql> set global local_infile = 'ON';

登录时:mysql --local-infile=1 -u root -p

posted on 2019-04-02 09:37  MasterTumbler  阅读(690)  评论(0)    收藏  举报

导航