首页 > 数据库 > MySQL > 正文

MySQL 5.7向表导入数据报错 ERROR 13 HY000 Can t get stat of

2024-07-24 12:31:52
字体:
来源:转载
供稿:网友
         MySQL 5.7向表导入数据时报错:
 
        mysql> load data infile '/var/lib/mysql-files/ADDSubscribers_MSISDN.txt' into table tmp_Subscribers_01 fields enclosed by '"';
        ERROR 13 (HY000): Can't get stat of '/var/lib/mysql-files/ADDSubscribers_MSISDN.txt' (Errcode: 13 - Permission denied)
 
解决方法:
在load语句中加上local参数
 
mysql> load data local infile '/tmp/ADDSubscribers_MSISDN.txt' into table tmp_Subscribers_01 fields enclosed by '"';
Query OK, 0 rows affected, 10 warnings (0.00 sec)
Records: 10  Deleted: 0  Skipped: 10  Warnings: 10

(编辑:武林网)

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表