ulimit -a或ulimit -n
可以看到系统默认的
open files (-n) 1024
如果数量太少,mysql会报1016错误
Can't open file: './db/tab_test.frm' (errno: 24 - Too many open files)
show variables like '%connect%';
可以看到
max_connections | 500
可以直接修改数据库实例用户的open files 。
修改my.cnfmax_connections,然后重启mysql后。
或者直接修改mysql的max_connections 的数量
set global max_connections=14000;