Advertisement
Guest User

/lib/systemd/system/mysqld.service

a guest
Apr 14th, 2013
473
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.45 KB | None | 0 0
  1. # It's not recommended to modify this file in-place, because it will be
  2. # overwritten during package upgrades. If you want to customize, the
  3. # best way is to create a file "/etc/systemd/system/mysqld.service",
  4. # containing
  5. # .include /lib/systemd/system/mysqld.service
  6. # ...make your changes here...
  7. # For more info about custom unit files, see
  8. # http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F
  9.  
  10. # For example, if you want to increase mysql's open-files-limit to 10000,
  11. # you need to increase systemd's LimitNOFILE setting, so create a file named
  12. # "/etc/systemd/system/mysqld.service" containing:
  13. # .include /lib/systemd/system/mysqld.service
  14. # [Service]
  15. # LimitNOFILE=10000
  16.  
  17. # Note: in F-17 and beyond, /usr/lib/... is recommended in the .include line
  18. # though /lib/... will still work.
  19.  
  20. [Unit]
  21. Description=MySQL database server
  22. After=syslog.target
  23. After=network.target
  24.  
  25. [Service]
  26. Type=simple
  27. User=mysql
  28. Group=mysql
  29.  
  30. ExecStartPre=/usr/libexec/mysqld-prepare-db-dir %n
  31. # Note: we set --basedir to prevent probes that might trigger SELinux alarms,
  32. # per bug #547485
  33. ExecStart=/usr/bin/mysqld_safe --basedir=/usr
  34. ExecStartPost=/usr/libexec/mysqld-wait-ready $MAINPID
  35.  
  36. # Give a reasonable amount of time for the server to start up/shut down
  37. TimeoutSec=300
  38.  
  39. # Place temp files in a secure directory, not /tmp
  40. PrivateTmp=true
  41.  
  42. [Install]
  43. WantedBy=multi-user.target
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement