-1

I am trying to change the temp location for MySQL from default /tmp to /somedrive/mysqltmp as i am getting

Errcode: 28 - No space left on device

Solution: 1

I tried to add a line in /etc/my.cnf as tmpdir=/somedrive/mysqltmp

then issued sudo service mysql stop and sudo service mysql start

After restart, i still see ERROR remains.

Solution: 2

Based on this I tried

mysqld --verbose --help | grep tmp

tmp-table-size     16777216
tmpdir             /tmp

and then i tried

mysqld --tmpdir=/somedrive/mysqltmp

to change the defaults. But i am not able to change the tmp directory. I am not sure what i am missing!

I figured this out: Do changes under

[mysqld] as

tmpdir=/somedrive/mysqltmp

and then issue sudo service mysql stop and sudo service mysql start

Now check:

mysqld --verbose --help | grep tmp

tmp-table-size     16777216
tmpdir             /somedrive/mysqltmp
s_mj
  • 530
  • 11
  • 28
  • Usually, `/tmp` is a temporary device stored in memory that has a lot of free space. Maybe you want to enlarge that device? – Nico Haase Apr 18 '18 at 12:18
  • @NicoHaase Not many want to do that on a production system. Moreover, there are posts that support how to do it but in my case, i had an additional label specifier. Thanks :) – s_mj Apr 23 '18 at 14:50

2 Answers2

1

This has happened to me before because mysql was using a my.cnf in a different location. Search for another my.cnf. You could also try moving the my.cnf file that you know of and see if mysql complains.

casey
  • 28
  • 1
  • 6
  • `sudo find / -name '*.cnf'` `/etc/my.cnf` `/var/lib/mysql/auto.cnf` `/usr/share/doc/mysql-community-server-5.6.35/my-default.cnf` `/usr/share/mysql/my-default.cnf` – s_mj Apr 18 '18 at 12:38
0

Do changes under

[mysqld] as

tmpdir=/somedrive/mysqltmp

and then issue sudo service mysql stop and sudo service mysql start

Now check:

mysqld --verbose --help | grep tmp

tmp-table-size     16777216
tmpdir             /somedrive/mysqltmp
s_mj
  • 530
  • 11
  • 28