解决Mac在MySQL workbench 中出现的Error 1148

在workbench上尝试导入.txt文件后,出现1148错误提示。

load data local infile '/Users/w**/Desktop/SQL/all.txt' 	into table Monthly_Indicator 
    fields terminated by '\t'
    ignore 1 lines;

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

查了很多解决方式,都是说local_infile这里应该改为on,但是查看后是没问题的。查看语句:

show global variables like 'local_infile';

后来在stack overflow上找到了答案:
在这里插入图片描述
弄了半天,是workbench的版本问题,下载5.7版本就可以了。
如果local_infile检查没有问题还是出现这种情况,可以尝试此办法。

发布了1 篇原创文章 · 获赞 0 · 访问量 10

猜你喜欢

转载自blog.csdn.net/m0_46305490/article/details/104514629