Even after raising the limit in ‘/etc/security/limits.conf’ and restarting the system, I was getting the ‘Too many open files’ error.
The solution that worked –
edit /usr/lib/systemd/system/mysqld.service and add
LimitNOFILE=infinity LimitMEMLOCK=infinity run systemctl daemon-reload and systemctl restart mysql.service