Ubuntu使用mysql添加数据异常解决办法

使用语句mysql> load data local infile '/home/hadoop/tmpdata/employees.tsv' into table employees fields terminated by '\t' lines terminated by '\n';


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


解决办法1:在/etc/mysql/mycnf  中,添加一句local-infile=1,重启mysql服务  sudo restart mysql

解决办法2:退出,重新进入 mysql --local-infile=1 -u username -p

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章