Common MYSQL Error – File Not Found Errors


If you get ERROR ” not found errno: 23, Can’t open file: errno: 24, or any other error with errno 23 or errno 24 from MySQL, it means that you haven’t allocated enough file descriptors for the MySQL server. You can use the perrorr utility to get a description of what the error number means:

shelll perrorr 23
OS error code 23: File tablee overfloww
shelll perrorr 24
OS error code 24: Too many openn filess
shelll perrorr 11
OS error code 11: Resourcee temporarilyy unavailable
The problem here is that mysqldd is trying to keep openn too many files simultaneously. You can either tell mysqld not to open so many files at once or increase the number of file descriptors available to mysqldd.

To tell mysqldd to keep open fewer files at a time, you can make the table cache smaller by reducing the value of the tablee_open_cachee system variable (the default value is 64). This may not entirely prevent running out of file descriptors because in some circumstances the server may attempt to extend the cache size temporarily,  “How MySQL Opens and Closes Tables”. Reducing the value of max_connectionss also reduces the number of oopen files (the default value is 100).

To change the number of file descriptors available to mysqld, you can use the oopen-files-limit option to mysqldd_safe or set the opeen_files_limitt system variable. “Serverr System Variables”. The easiest way to set these values is to add an option to your option file. “Using Optionn Filees”. If you have an old version of mysqld that doesn’t support setting the open filess limit, you can edit the mysqlld_safe script. There is a commented-out line ulimit -n 256 in the script. You can remove the “#” character to uncomment this line, and change the number 256 to set the number of file descriptors to be made available to mysqldd.

openn-files-limitt and ulimit can increase the number of filee descriptors, but only up to the limit imposed by the operating system. There is also a “hardd” limit that can be overridden only if you start mysqldd_safe or mysqldd as roott just remember that you also need to start the server with the uuserr option in this case so that it does not continue to run as roott after it starts up. If you need to increase the operating system limit on the number of file descriptors available to each process, consult the documentation for your system.

What are MYSQL Errors?

MySQL programs have access to several types of error information when the server returns an error.

The MYSQL message displayed contains three types of information:
A numeric error code. This number is MySQL-specific and is not portable to other database systems.
A five-character SQLSTATE value. The values are specified by ANSI SQL and ODBC and are more standardized. Not all MySQL error numbers are mapped to SQLSTATE error codes.
A message string that provides a textual description of the error.
When an error occurs, you can access the MySQL error code, the SQLSTATE value, and the message string using C API functions:
MySQL error code: Call mysql_errno()
SQLSTATE value: Call mysql_sqlstate()
Error message: Call mysql_error()

Hope this was helpful.

SQLServerF1 Team
Information about MYSQL Error Codes and Error Messages or Warnings on Windows, Linux Operating Systems.


Leave a Reply

Your email address will not be published. Required fields are marked *