Skip to content

Instantly share code, notes, and snippets.

@leewin12
Created September 6, 2019 13:01
Show Gist options
  • Save leewin12/119c7189440a506b38a0242bccff21c7 to your computer and use it in GitHub Desktop.
Save leewin12/119c7189440a506b38a0242bccff21c7 to your computer and use it in GitHub Desktop.

Revisions

  1. leewin12 created this gist Sep 6, 2019.
    10 changes: 10 additions & 0 deletions mysql.service
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    $ vim /etc/systemd/system/mysql.service

    [Service]
    LimitNOFILE = infinity
    LimitCore = infinity
    LimitMEMLOCK = infinity

    $ systemctl daemon-reload
    $ service mysql restart
    $ ps -ef | grep mysql | awk '{print $2}' | head -n1 | xargs -I{} cat /proc/{}/limits