I am getting error when using load data to insert the query .
"load data infile '/home/bharathi/out.txt' into table Summary"
This file is there in the location . But mysql throws the below error .
ERROR 29 (HY000): File ‘/home/bharathi/out.txt’ not found (Errcode: 13)
show variables like 'data%';
+---------------+-----------------+
| Variable_name | Value |
+---------------+-----------------+
| datadir | /var/lib/mysql/ |
+---------------+-----------------+
Data Dir is pointing to root permissioned folder . I can’t change this variable because it’s readonly .
How can I do the load data infile operation ?
I tried changing file permissions , load data local infile . It wont work .
As documented under
LOAD DATA INFILESyntax:You should therefore either:
Ensure that your MySQL user has the
FILEprivilege and, assuming that thesecure_file_privsystem variable is not set:make the file readable by all; or
move the file into the database directory.
Or else, use the
LOCALkeyword to have the file read by your client and transmitted to the server. However, note that: