Out of resources when opening file '/????????????.MYD' (Errcode: 24) 解决

Out of resources when opening file '/????????????.MYD' (Errcode: 24) 解决

 

 

MYSQL出现此类错误是因为打开的文件数超过了my.cnf的--open-files-limit。open-files-limit选项无法在mysql命令行直接修改,必须在my.cnf中设定,最大值是65536。

vi /etc/my.cnf

 添加:

open-files-limit = 65536

重启mysql

/etc/init.d/mysql stop
sleep 1
/etc/init.d/mysql start

重新启动以后,发现

mysql> show variables like 'open%';
+------------------+-------+
| Variable_name    | Value |
+------------------+-------+
| open_files_limit | 1024  | 
+------------------+-------+
1 row in set (0.00 sec)

修改后

mysql> show variables like 'open%';
+------------------+-------+
| Variable_name    | Value |
+------------------+-------+
| open_files_limit | 65536 |
+------------------+-------+
1 row in set (0.00 sec)

 

你可能感兴趣的:(mysql)