Search the MySQL manual:

4.8.11 perror, Explaining Error Codes

For most system errors MySQL will, in addition to a internal text message, also print the system error code in one of the following styles: message ... (errno: #) or message ... (Errcode: #).

You can find out what the error code means by either examining the documentation for your system or use the perror utility.

perror prints a description for a system error code, or an MyISAM/ISAM storage engine (table handler) error code.

perror is invoked like this:

shell> perror [OPTIONS] [ERRORCODE [ERRORCODE...]]

Example:

shell> perror 13 64
Error code  13:  Permission denied
Error code  64:  Machine is not on the network

Note that the error messages are mostly system dependent!

User Comments

Posted by mysql on Thursday August 15 2002, @8:47am[Delete] [Edit]

If you get an Errcode 13 when trying to USE a
database you created during a previous session,
try logging in as 'root' in Linux and then logon
to your installation of MySQL and USE the
database. Problem solved!

Posted by [name withheld] on Wednesday November 13 2002, @11:35pm[Delete] [Edit]

If logging in as root solves your problem, you
need to figure out what your real permission
issues are. You should not need to log in as root
to use mysql tables -- I do not. Look and see
what files your mysqld is accessing -
/var/lib/mysql, for example. All files in that
tree should be owned by mysql, group mysql.

Check your logs as well. In Redhat, the script
that starts mysql fixes a lot of permissions. If
you are not using the /etc/rc.d/init.d/mysqld
script (probably as service mysqld start) why is
that?

Posted by Martin Mokrejs on Monday March 10 2003, @3:07am[Delete] [Edit]

Does anyone know where can one get a list of error codes? I just cannot find such a file at all. :(

Posted by Nils Valentin on Tuesday March 25 2003, @1:54am[Delete] [Edit]

Hello,

I was looking for the same. The best I found was a printed error list in the book ISBN 1893115577 Michael Kofler- MySQL on Pages 631-641. I could fax you the pages if you let me know were to.

Best regards

Nils Valentin
valentin_nils(at)be-known-online.com

Posted by Dan Ross on Tuesday June 3 2003, @4:00pm[Delete] [Edit]

Regarding list of MySQL errors.

If you use unix, you can generate the list with the command:
perror `seq a b`
where a is the first error code and b is the last error code you want to list.
For example,
perror `seq 0 10`
shows codes 0 through 10.

Posted by John Morlock on Thursday July 17 2003, @2:10pm[Delete] [Edit]

This information is helpful, but there is no mention of how to invoke perror under the Windows platform?

Add your own comment.