#1016-无法打开文件:'./database_name/#sql-38f_36aa.frm'(errno:24) [英] #1016 - Can't open file: './database_name/#sql-38f_36aa.frm' (errno: 24)

查看:101
本文介绍了#1016-无法打开文件:'./database_name/#sql-38f_36aa.frm'(errno:24)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在具有MyISAM存储引擎的mysql中有表. 我想在特定表上创建分区,为此,我正在执行查询-

I have table in mysql with MyISAM storage engine. I want to create partition on a particular table, for this I am executing the query -

alter table Stops PARTITION BY KEY(`stop_id`) PARTITIONS 200

其中"stop_id"是varchar的类型.执行上述查询时,出现错误-

Where 'stop_id' is type of varchar. While executing the above query I am getting the error -

#1016 - Can't open file: './database_name/#sql-38f_36aa.frm' (errno: 24)

有人可以帮我解决这个问题吗?

Can anybody please help me to resolve this problem?

谢谢.

推荐答案

来自这里这里.

errno:24表示给定进程打开了太多文件. 有一个名为"open_files_limit"的只读mysql变量,该变量 将显示mysqld允许多少个打开文件:

errno: 24 means that too many files are open for the given process. There is a read-only mysql variable called 'open_files_limit' that will show how many open files are allowed by the mysqld:

SHOW VARIABLES LIKE 'open%';

许多系统将此值设置为非常低的值,例如1024. 不幸的是,以下操作无效:

A lot systems set this to something very low, like 1024. Unfortunately, the following will NOT work:

SET open_files_limit = 100000

SET open_files_limit=100000

MySQL将回应:

错误1238(HY000):变量'open_files_limit'是只读的 变量

ERROR 1238 (HY000): Variable 'open_files_limit' is a read only variable

但是,可以对/etc/my.cnf进行更改.该文件可能 不存在,如果不存在,就创建它.确保它具有以下内容 内容:

However, it is possible to make a change to /etc/my.cnf. This file may not exist, if not, just create it. Be sure it has the following contents:

[mysqld]

open-files-limit = 100000

然后,请确保重新启动mysql:

Then, be sure to restart mysql:

sudo/etc/init.d/mysql重新启动

sudo /etc/init.d/mysql restart

现在,像"open%"这样的SHOW VARIABLES应该显示100000. 用途可能有所不同.

Now, SHOW VARIABLES LIKE 'open%' should show 100000. The number you use may be different.

这篇关于#1016-无法打开文件:'./database_name/#sql-38f_36aa.frm'(errno:24)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆