21.4. The perror Utility


21.4. The perror Utility

perror is a command-line utility that is included with MySQL distributions. The purpose of the perror program is to show you information about the error codes used by MySQL when operating system-level errors occur. You can use perror in situations when a statement results in a message such as the following being returned to you:

 mysql> CREATE TABLE CountryCopy SELECT * FROM Country; ERROR 1 (HY000): Can't create/write to file './world/CountryCopy.frm' (Errcode: 13) 

This error message indicates that MySQL cannot write to the file CountryCopy.frm, but does not report the reason. It might be due to a full disk, a filesystem permissions problem, or some other error. To find out, run the perror program with an argument of the number given following Errcode in the preceding error message. perror displays a message indicating that the source of the problem is that someone has incorrectly set the filesystem permissions for the current database:

 shell> perror 13 Error code  13:  Permission denied 



MySQL 5 Certification Study Guide
MySQL 5.0 Certification Study Guide
ISBN: 0672328127
EAN: 2147483647
Year: 2006
Pages: 312

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net