Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Mysql default tmpdir how to find

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

How to find mysql default tmpdir? This problem may be often seen in our daily study or work. I hope you can gain a lot from this question. The following is the reference content that the editor brings to you, let's take a look at it!

Source of error?

The upper directory / data where the MySQL data directory / data/mysql is located failed to start MySQL due to insufficient disk space, so other useless directories except the MySQL subdirectory in the / data directory were cleaned up. Restart found or failed. Check the error log.

You see the following error:

/ usr/local/mysql/bin/mysqld: Can't create/write to file'/ data/tmp/ibbLmEoD' (Errcode: 13-Permission denied)

It turns out that when cleaning up useless directories, the tmpdir--/data/tmp directory specified in the MySQL configuration file was accidentally deleted, resulting in some temporary files or tables that could not be written when MySQL Server was started, resulting in startup failure. After rebuilding the directory and giving the correct permissions, restart MySQL Server and start normally.

Let's talk about the parameter MySQL temporary directory:

Command line argument format:-- tmpdir=path

Configuration file reference format: tmpdir=path

Temporary directories are used to store temporary files or temporary tables. The value can be a list of paths separated by ":" (Unix) or ";" (Windows), which can be used in turn to distribute the load to different disks. If MySQL server is in the role of Slave, you cannot point the directory to an in-memory file system-based directory or a directory that will be cleaned up when the host is rebooted, because Slave requires these files to copy temporary tables or perform LOAD DATA INFILE operations, and the loss of these files will cause replication to fail. This means that slave's tmpdir cannot be set to the default / tmp directory of the linux system. For Slave, you can use another configuration item, slave_load_tmpdir, to set its temporary directory so that Slave does not use the temporary directory set by the general option tmpdir. There is no such restriction for MySQL server for non-Slave roles.

The absence of temporary directories or incorrect permissions will not only cause MySQL Server to fail to start, but also cause other MySQL utilities that may use temporary directories to run abnormally. Many MySQL-related programs read option values from MySQL Server configuration files, such as the full program xtrabackup. The following error is caused by the non-existence of the 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.

Thank you for reading! After reading the above, do you have a general idea of how to find the default tmpdir of mysql? I hope the content of the article will be helpful to all of you. If you want to know more about the relevant articles, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report