Oracle 5.0 Reference Manual page 2985

Table of Contents

Advertisement

If the MySQL server is acting as a replication slave, you should not set
directory on a memory-based file system or to a directory that is cleared when the server host restarts.
A replication slave needs some of its temporary files to survive a machine restart so that it can replicate
temporary tables or
when the server restarts, replication fails.
MySQL arranges that temporary files are removed if
it (such as Unix), this is done by unlinking the file after opening it. The disadvantage of this is that
the name does not appear in directory listings and you do not see a big temporary file that fills up the
file system in which the temporary file directory is located. (In such cases,
identifying large files associated with mysqld.)
When sorting
maximum disk space required is determined by the following expression:
(length of what is sorted + sizeof(row pointer))
* number of matched rows
* 2
The row pointer size is usually four bytes, but may grow in the future for really big tables.
For some
SELECT
names of the form SQL_*.
ALTER TABLE
C.5.4.5. How to Protect or Change the MySQL Unix Socket File
The default location for the Unix socket file that the server uses for communication with local clients is
/tmp/mysql.sock. (For some distribution formats, the directory might be different, such as
lib/mysql
On some versions of Unix, anyone can delete files in the
used for temporary files. If the socket file is located in such a directory on your system, this might cause
problems.
On most versions of Unix, you can protect your
owners or the superuser (root). To do this, set the
and using the following command:
root
shell>
chmod +t /tmp
You can check whether the
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
See
Section 4.2.3.3, "Using Option
• Specify a
programs.
• Set the
MYSQL_UNIX_PORT
Administration-Related Issues
LOAD DATA INFILE
(ORDER BY
or
GROUP
queries, MySQL also creates temporary SQL tables. These are not hidden and have
creates a temporary table in the same directory as the original table.
for RPMs.)
sticky
[232]
option on the command line to
--socket
environment variable to the path of the Unix socket file.
operations. If files in the temporary file directory are lost
mysqld
BY), MySQL normally uses one or two temporary files. The
/tmp
directory so that files can be deleted only by their
/tmp
sticky
bit is set by executing
ls -ld
Files".
2965
[424]
--tmpdir
is terminated. On platforms that support
may be helpful in
ls +L1
directory or other similar directories
bit on the
directory by logging in as
/tmp
/tmp. If the last permission
and when you run client
mysqld_safe
to point to a
/var/

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents