The error message is as follows:
.....
070813 13:10:17 [ERROR]/usr/local/mysql/bin/mysqld: Can't open file: './yejr/access. frm' (errno: 24)
070813 13:10:17 [ERROR]/usr/local/mysql/bin/mysqld: Can't open file: './yejr/accesslog. frm' (errno: 24)
......
070813 13:10:17 [ERROR] Error in accept: Too open files
....
Note that the system error code is 24. Use perror to check the specific error information:
[Root @ yejr] #/usr/bin/perror 24
OS error code 24: Too enabled open files
It turns out that too many files are opened, which is easy to handle. Use sysctl to adjust it:
[Root @ yejr] # sysctl-w fs. file-max = 43621
[Root @ yejr] # sysctl-a | grep fs. file-max
Fs. file-max = 43621
Sysctl is also used to adjust FreeBSD:
[Root @ yejr] # sysctl-w kern. maxfiles = 123280
[Root @ yejr] # sysctl-a | grep kern. maxfiles
Kern. maxfiles = 123280
Finally, the most important thing is to modify the mysqld configuration file my. cnf and add the following line:
Open_files_limit = 4096
# Adjust the value as needed. The default value is
# Max_connections * 5 or max_connections + table_cache * 2
Then, restart mysqld as root. here, even though my. the running user specified in cnf is not the root user. You can also start mysqld as the root user. Otherwise, the open_files_limit option cannot take effect because the kernel limits the maximum number of files opened by normal users.