Load data data in MySQL
mysql> load Data infile '/home/a.txt ' into table table_a;
ERROR (HY000): Can ' t get stat of '/home/a.txt ' (errcode:13)
We use the perror command to print out specific error messages
>perror 13
OS error code 13:permission denied
Seems to be a matter of permissions,
The perror command is a utility in the MySQL database system that prints the meaning of the errno error code in C and the meaning of the storage Engine error code in MySQL. (perror prints a description for a system error code or for a storage engine (table handler) error code.)
Since Perror is a utility program in MySQL and cannot be performed on a machine that does not have MySQL installed , example four of this article will give you a general source code for your reference.
Common parameters
Format: perror <errno>
The meaning of the print system error code errno value.
Format: perror <Errcode>
Print the meaning of the error code defined in the MySQL database system.
Format: perror <err1> <err2> ...
Prints the meaning of multiple error codes.
(Reference: http://codingstandards.iteye.com/blog/1127327)
Find an article:
Mysql:error13 (HY000): Problem with Can ' t get stat of But replace load data INFILE with load data
LOCALINFILE ok! Cause analysis: From MySQL Chinese manual: For security reasons, when reading a text file located in the server,The file must be in the database directory, or it is all-readable。 In addition, to use load DATA INFILE for server files, you must have file permissions. If local is specified, the file is read by clients on the client's host and sent to the server. The file is given a full path name to specify the exact location. Permission problem Ah! Reference: http://blog.chinaunix.net/uid-23392298-id-62350.html
Mysql:error13 (HY000): Can ' t get stat of