Follow dba-ninja.com

Subscribe to RSS feed  Follow @jackvamvas - Twitter

*Use the Comments section for questions

dba-ninja.com Links

Dba_db2_button

Sqlserver_dba_button

MariaDB /tmp file filling with MAD file

15 January,2020 by Rambler

Question: I've received an alert from a RHEL server with MariaDB installed. The alert refers to a MAD file filling the /tmp drive . What is going on? and how can I fix the mysql MAD file filling the /tmp drive?

Answer: This is a common problem when under certain circumstances - CREATE & ALTER statements executed on InnoDB tables create a temporary table in mysql's tmpdir.   

To find out the current value check my.cnf  or use SHOW VARIABLES LIKE "TMPDIR

During the data load phase MariaDB creates a temporary table in /tmp - which consequently fills the /tmp

The quick fix is to alter the tmpdir value in my.cnf and restart mysql  .   Find the directory which has enough disk space to support the load requirement.

Before you load the data you can check the tmpdir variable. 

SHOW VARIABLES LIKE "TMPDIR";

 

+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| tmpdir | /tmp |
+---------------+-------+
1 row in set (0.01 sec)

 

Go to the my.cnf   file and add\modify the tmdir variable. Ensure the  entry is placed in the [mysqld] section.

Restart the mysql service :  service mysql restart       and check  SHOW VARIABLES LIKE "TMPDIR";

 

 

 

 


Author: Rambler (http://www.dba-ninja.com)


Share:

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment on MariaDB /tmp file filling with MAD file


dba-ninja.com