[ERROR] /usr/sbin/mysqld: Can’t open file
I got this error while migrating huge amount of accounts from one cpanel server to another.
[ERROR] /usr/sbin/mysqld: Can’t open file: ‘./dbname/tablename.frm’ (errno: 24)
errno: 24
means there is too many open files. There is a mysql variable named “open_files_limit"
which shows how many open files are allowed in mysql by default. We cannot update this valuse using “Set” command as this variable is a read only variable.
root@server ~ # mysqladmin variables |grep -i open
| have_openssl | DISABLED | | innodb_open_files | 300 | | open_files_limit | 1024 | | table_open_cache | 64|
To increase this value, we can set this in my.cnf like the below ( you can set any desired value or required value)
[mysqld]
open_files_limit = 9999
and then save and restart mysql service. After that you can see the value is changed in mysqladmin variables list and error should be gone from mysql error log.
root@server ~ # mysqladmin variables |grep -i open
| have_openssl | DISABLED | | innodb_open_files | 300 | | open_files_limit |9999|
Facebook Comments