18.6 How to protect `/tmp/mysql.sock' from being deleted

If you have problems with the fact that anyone can delete the MySQL communication socket `/tmp/mysql.sock', you can, on most versions of Unix, protect your `/tmp' file system by setting the sticky bit on it. Log in as root and do the following:

shell> chmod +t /tmp

This will protect your `/tmp' file system so that files can be deleted only by their owners or the superuser (root).

You can check if the sticky bit is set by executing ls -ld /tmp. If the last permission bit is t, the bit is set.