:: DEVELOPER ZONE
The default location for the Unix socket file that the server uses
for communication with local clients is
/tmp/mysql.sock. This might cause problems,
because on some versions of Unix, anyone can delete files in the
/tmp directory.
On most versions of Unix, you can protect your
/tmp directory so that files can be deleted
only by their owners or the superuser (root). To
do this, set the sticky bit on the
/tmp directory by logging in as
root and using the following command:
shell> chmod +t /tmp
You can check whether the sticky bit is set by
executing ls -ld /tmp. If the last permission
character is t, the bit is set.
Another approach is to change the place where the server creates the Unix socket file. If you do this, you should also let client programs know the new location of the file. You can specify the file location in several ways:
Specify the path in a global or local option file. For example, put
the following lines in /etc/my.cnf:
[mysqld] socket=/path/to/socket [client] socket=/path/to/socket
Specify a --socket option on the command line to
mysqld_safe and when you run client programs.
Set the MYSQL_UNIX_PORT environment variable to
the path of the Unix socket file.
Recompile MySQL from source to use a different default Unix socket
file location. Define the path to the file with the
--with-unix-socket-path option when you run
configure. See
Section 2.8.2, “Typical configure Options”.
You can test whether the new socket location works by attempting to connect to the server with this command:
shell> mysqladmin --socket=/path/to/socket version
© 1995-2005 MySQL AB. All rights reserved.

User Comments
Warning: query failed: Unknown column 'user.firstname' in 'field list' in /data0/sites/live/web-main/lib/mysql-cxn.php on line 69
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /data0/sites/live/web-main/lib/docbook.php on line 245
Add your own comment.