You may check the local_infile is disabled or enable. So, you try this-
mysql> show global variables like 'local_infile';
if it shows-
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| local_infile | OFF |
+---------------+-------+
(this means local_infile is disable)
then enable with this-
mysql> set global local_infile=true;
Then check again and quit from mysql server with this-
mysql> exit
Now you have to connect/login server with local_infile. For this run this code from terminal command line-
mysql --local_infile=1 -u root -ppassword DB_name
now load the data from local file-
mysql> load data local infile 'path/file_name.extention' into table table_name;
原文地址
链接: link