Skip to content

Instantly share code, notes, and snippets.

@meska
Last active July 16, 2017 14:30
Show Gist options
  • Save meska/22f299c4743ad32f775fb2d6b24f579e to your computer and use it in GitHub Desktop.
Save meska/22f299c4743ad32f775fb2d6b24f579e to your computer and use it in GitHub Desktop.
mysql file limit ubuntu

Limite files aperti mysql

Impostare security limits

modificare il file

nano /etc/security/limits.conf

aggiungere alla fine:

mysql soft  nofile 163840
mysql hard  nofile 163840

modificare il file

nano /etc/pam.d/common-session

aggiungere alla fine:

session required pam_limits.so

Impostare mysql

modificare il file

nano /lib/systemd/system/mysql.service

aggiungere alla fine:

LimitNOFILE=163840
LimitMEMLOCK= 163840

Riavviare la VM

reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment