- Find out whether MySQL, or MariaDB service is used:
# systemctl list-unit-files | grep -E ‘mysql|mariadb’
mariadb.service enabled - Create an override for the service file from the previous step:
# systemctl edit mariadb.service
Note: In case
mysql.service
, ormysqld.service
was displayed on the previous step, replace “mariadb.service
” with it. - Add the following content to the opened text editor and save the file:
[Service]
LimitNOFILE=4096Note: Value might be increased if required, 4096 is only a suggested value.
- Restart the MySQL/MariaDB server:
# systemctl restart mysql mysqld mariadb 2>/dev/null