ERROR 23 (HY000) at line 29963: Out of resources when opening file

时间:2024-01-14 13:52:02

在还原数据库时报错,报错信息如下:(库中的表比较多)

ERROR 23 (HY000) at line 29963: Out of resources when opening file

解决方法:

在root下修改ulimit值

[root@yoon export]# ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 1032169
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 10240
cpu time               (seconds, -t) unlimited
max user processes              (-u) 1024
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

修改open files和max user processes 值:
[root@yoon export]# ulimit -n 65535
[root@yoon export]# ulimit -u 65535

修改完open files和max user processes 值后,重启mysql数据库,然后再还原数据库即可