MySQL: modify tmpdir parameter _ MySQL

Source: Internet
Author: User
In this article, we will share with you how to modify the tmpdir parameter in MySQL in linux to solve the problem of tmpdir errors. if you have the same requirements, you can refer to the next alarm message that you suddenly receive today, yes/the disk space usage exceeds the threshold. It was found that there were many abnormal SQL statements that could not be executed, resulting in continuous processing, resulting in temporary use of/tmp disk space.

Because the/tmp space of the operating system is limited, you need to modify the parameter and modify the value path of tmpdir.

Mysql> show variables like 'tmpdir '; + --------------- + ------- + | Variable_name | Value | + --------------- + ------- + | tmpdir |/tmp | + --------------- + ------- + 1 row in set (0.00 sec) mysql> set global tmpdir = '/Data/app/mysql5.6.25/mysqltmp'; ERROR 1238 (HY000): Variable 'tmpdir' is a read only variable

You can only modify the configuration file.

Restart mysql

Mysql> show variables like 'tmpdir '; + --------------- + percent + | Variable_name | Value | + --------------- + percent + | tmpdir |/mysql5.6/var/tmp | + --------------- + percent + 1 row in set (0.00 sec)

Q: But the service cannot be restarted in the production environment. how can this problem be solved?

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.