Mysqlimport: Error: 13, Can't get stat of Solution

Source: Internet
Author: User

Mysqlimport: Error: 13, Can't get stat of problem solution this article introduces how to solve mysqlimport: Error: 13, the Can't get stat of method is described in detail for your reference. When I read the mysql user manual and saw the mysqlimport command for Backup Recovery, a strange problem occurred after the operation. Java code root @ zhou:/usr/local/mysql # mysqlimport-uroot-p123-h127.0.0.1-P3306 test backup/chen. SQL mysqlimport: Error: 13, Can't get stat of '/usr/local/mysql/data/backup/chen. SQL '(Errcode: 2), when using table: chen here we use perror to query the cause of this error: Java code root @ zhou: /usr/local/mysql # perror 13 root @ zhou:/usr/local/mysql # ll OS error code 13: permission denied, but here I checked my permissions, and there is no problem. My backup files are in the backup document. Total Java code usage 120 drwxr-xr-x 17 root mysql 4096 19:02 on January 1, January 10. /drwxr-xr-x 22 root 4096 January 8 11:34 .. /drwxr-xr-x 2 mysql 4096 January 10 17:30 backup/drwxr-xr-x 2 root mysql 4096 January 8 10:39 bin/solution: First google and Baidu, check whether the problem can be solved. Then I am using load data infile to see if this problem will also occur (the load command here is the same command ). Google and Baidu didn't find the answer they wanted, but I found no problem during the load data infile operation. So the conclusion here should not be the permission problem: mJava code ysql (root @ localhost: test)> load data infile '/usr/local/mysql/backup/chen. SQL 'into table chen; Query OK, 6 rows affected (0.07 sec) Records: 6 Deleted: 0 Skipped: 0 Warnings: 0 finally Query this command through man, we will find that this is a problem with the -- local command. Java code root @ zhou:/usr/local/mysql # mysqlimport-uroot-p123-h127.0.0.1-P3306 test backup/chen. SQL mysqlimport: Error: 13, Can't get stat of '/usr/local/mysql/data/backup/chen. SQL '(Errcode: 2), when using table: chen root @ zhou:/usr/local/mysql # mysqlimport-uroot-p123-h127.0.0.1-P3306 test backup/chen. SQL -- local test. chen: Records: 6 Deleted: 0 Skipped: 0 Warnings: 0 solves the problem. Here -- local: Specify The user's computer reads data files. Otherwise, the problem is found in the server's computer. -- Local
 

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.