Mysql:error13 (HY000): Can ' t get stat of

Source: Internet
Author: User
Tags file permissions

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.