Load data infile 出错,File ‘/tmp/tbl_mws_alexa_lexi’ not found (Errcode: 13)

需要改变file的权限和owner为mysql

sa@ubuntu:~$ sudo chown mysql:mysql /tmp/tbl_mws_alexa_lexi
mysql> load data infile ‘/tmp/tbl_mws_alexa_lexi’ into table tbl_mws_alexa_lexi;

ERROR 29 (HY000): File ‘/tmp/tbl_mws_alexa_lexi’ not found (Errcode: 13)
mysql> load data local infile ‘/tmp/tbl_mws_alexa_lexi’ into table tbl_mws_alexa_lexi;
ERROR 1148 (42000): The used command is not allowed with this MySQL version
mysql> load data local infile ‘/tmp/tbl_mws_alexa_lexi’ into table tbl_mws_alexa_lexi;
ERROR 1148 (42000): The used command is not allowed with this MySQL version
mysql> load data infile ‘/tmp/tbl_mws_alexa_lexi’ into table tbl_mws_alexa_lexi;
Query OK, 2747962 rows affected, 65535 warnings (42.79 sec)
Records: 2747962 Deleted: 0 Skipped: 0 Warnings: 5495924

mysql>

sa@ubuntu:~$ mysql -V
mysql Ver 14.14 Distrib 5.5.22, for debian-linux-gnu (x86_64) using readline 6.2
sa@ubuntu:~$

sa@ubuntu:~$ ls -al /tmp/
total 1165248
drwxrwxrwt 2 root root 4096 Aug 7 16:54 .
drwxr-xr-x 23 root root 4096 Jul 20 11:09 ..
-rwxrwxrwx 1 mysql mysql 329490142 Aug 7 16:42 tbl_mws_alexa_lexi
-rwxrwxrwx 1 mysql mysql 863709362 Jul 20 14:27 tbl_sec_mws


评论

该日志第一篇评论

发表评论

评论也有版权!