ERROR 1148: The used command is not allowed with this MySQL version
出现以上问题根据手册:
如果LOAD DATA LOCAL INFILE在服务器或客户端被禁用,试图执行该语句的客户端将收到下面的错误消息 ERROR 1148: The used command is not allowed with this MySQL version
查询解决方案:
mysql -u root -h 127.0.0.1 weixin --local-infile=1 -e "load data local infile '/home/shiyanlou/pet.txt' into table pet lines terminated by '\r\n';"
执行后没有输出,怀着激动的心查询数据库
果然数据存在了,这么搞还真管用
--local-infile=1 : 开启load功能
参考: