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