MySQL Temp Directory

Source: Internet
Author: User

MySQL Data directory/data/mysql is located in the upper directory/data disk space is not enough to cause MySQL boot failure, so clean up the/data directory in addition to the MySQL subdirectory of the other useless directory. Restart discovery or failure. Check the error log. See the following error:
/usr/local/mysql/bin/mysqld:can ' t create/write to file '/data/tmp/ibblmeod ' (Errcode:13-permission denied)

The original is to clean up the useless directory accidentally the MySQL configuration file specified in the Tmpdir--/data/tmp directory is also deleted, resulting in MySQL server startup some temporary files or tables can not be written to start the failure. After rebuilding the directory and giving the correct permissions, restart MySQL Server and start normally.


By the way, the MySQL temp directory this parameter:

command-line parameter format:--tmpdir=path
Configuration file parameter format: Tmpdir=path

Temporary directories are used to store temporary files or temporary tables. The value can be one that uses ":" (Unix) or ";" (Windows) delimited list of paths that can be used in turn to divide the load into different disks. If MySQL server is the role of slave, you cannot point the directory to a directory based on the memory file system or to a directory that will be cleaned out when the host restarts, because slave requires these files to replicate the temporary table or perform the load DATA infile operation. The loss of these files can cause replication to fail. This means that the slave tmpdir cannot be said to be set to the Linux system default/tmp directory. For slave, you can use another configuration item slave_load_tmpdir to set its temporary directory so that slave can not use the common options tmpdir the temporary directory set. There is no such limit for MySQL server for non-slave roles.

If the temporary directory does not exist or the permissions are incorrect, it will not only cause MySQL server startup failure but will also cause other MySQL utilities that may use the TEMP directory to run the exception. Many MySQL-related programs read option values from the MySQL server's configuration file, such as the full program xtrabackup, the following error is caused by the absence of a temporary directory specified in the MySQL server configuration file.

Xtrabackup_56:can ' t create/write to file '/data/tmp/ibhbumcm ' (Errcode:2-No such file or directory)
2014-07-23 16:04:42 7f1b25c607e0 InnoDB:Error:unable to create temporary file; Errno:2
Xtrabackup:innodb_init (): Error occured.
Innobackupex:error:
Innobackupex:ibbackup failed At/usr/bin/innobackupex line 389.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.