Common Errors When Using MySQL Programs
2958
• Specify to the client the directory where the character set definition files are located. For many
clients, you can do this with the
--character-sets-dir
option.
• Copy the character definition files to the path where the client expects them to be.
C.5.2.18.
'
File
' Not Found
and Similar 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
perror
utility to get a description of what the
error number means:
shell>
perror 23
OS error code 23: File table overflow
shell>
perror 24
OS error code 24: Too many open files
shell>
perror 11
OS error code 11: Resource temporarily unavailable
The problem here is that
mysqld
is trying to keep open 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
mysqld
.
To tell
mysqld
to keep open fewer files at a time, you can make the table cache smaller by reducing
the value of the
table_cache
[498]
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, as described in
Section 8.8.3, “How MySQL Opens and Closes
Tables”
. Reducing the value of
max_connections
[467]
also reduces the number of open files (the
default value is 100).
To change the number of file descriptors available to
mysqld
, you can use the
--open-files-
limit
[248]
option to
mysqld_safe
or set the
open_files_limit
[480]
system variable. See
Section 5.1.4, “Server System Variables”
. The easiest way to set these values is to add an option
to your option file. See
Section 4.2.3.3, “Using Option Files”
. If you have an old version of
mysqld
that does not support setting the open files limit, you can edit the
mysqld_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
mysqld
.
--open-files-limit
[248]
and
ulimit
can increase the number of file descriptors, but only up to
the limit imposed by the operating system. There is also a “hard” limit that can be overridden only if you
start
mysqld_safe
or
mysqld
as
root
(just remember that you also need to start the server with the
--user
[424]
option in this case so that it does not continue to run as
root
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.
Note
If you run the
tcsh
shell,
ulimit
does not work!
tcsh
also reports incorrect
values when you ask for the current limits. In this case, you should start
mysqld_safe
using
sh
.
C.5.2.19. Table-Corruption Issues
If you have started
mysqld
with
--myisam-recover
[415]
, MySQL automatically checks and tries to
repair
MyISAM
tables if they are marked as 'not closed properly' or 'crashed'. If this happens, MySQL
writes an entry in the
hostname.err
file
'Warning: Checking table ...'
which is followed
by
Warning: Repairing table
if the table needs to be repaired. If you get a lot of these errors,
without
mysqld
having died unexpectedly just before, then something is wrong and needs to be
investigated further.
Summary of Contents for 5.0
Page 1: ...MySQL 5 0 Reference Manual ...
Page 18: ...xviii ...
Page 60: ...40 ...
Page 396: ...376 ...
Page 578: ...558 ...
Page 636: ...616 ...
Page 844: ...824 ...
Page 1234: ...1214 ...
Page 1427: ...MySQL Proxy Scripting 1407 ...
Page 1734: ...1714 ...
Page 1752: ...1732 ...
Page 1783: ...Configuring Connector ODBC 1763 ...
Page 1793: ...Connector ODBC Examples 1773 ...
Page 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Page 2850: ...2830 ...
Page 2854: ...2834 ...
Page 2928: ...2908 ...
Page 3000: ...2980 ...
Page 3122: ...3102 ...
Page 3126: ...3106 ...
Page 3174: ...3154 ...
Page 3232: ...3212 ...