For ubuntu, see Ubuntu 18.04 MariaDB 10.2 Too many open files
On taking MySQL backup with mysqldump, i get following error
mysqldump: Got error: 1030: "Got error 24 "Too many open files" from storage engine MyISAM" when using LOCK TABLES mysqldump: Error: 'Out of resources when opening file '/tmp/#sql_f68_2.MAD' (Errcode: 24 "Too many open files")' when trying to dump tablespaces
This is because open_files_limit limit in MySQL. To verify login to MySQL server and run
select @@open_files_limit;
This will give you current value of open_files_limit.
To increase, edit /etc/my.cnf file, add
vi /etc/my.cnf
Add under [mysqld] section
open_files_limit = 5000
Now restart MySQL server
systemctl restart mysql
Leave a Reply