MySQL Unix socket file
The MySQL server uses /tmp/mysql.sock as a default location for Unix socket files for communication with local clients. It may be different based on the distribution formats, such as /var/lib/mysql for RPMs.
On several Unix versions, it is possible to delete files stored in the /tmp directory and similar other directories used to store temporary files. It may cause problems if the socket file is stored in such a directory on the filesystem.
It is possible to protect the /tmp directory so as to ensure that the files can only be deleted by the owners or the root superuser. This is possible on almost every version of Unix. This can be done by setting the sticky bit on the /tmp directory while logged in as a root user. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access