Lance Bryant
Lance Bryant

Reputation: 157

Mysql wont start after changing temp dir on ubuntu 12.04

I run ubuntu 12.04. I am trying to move the temp dir for files as /tmp has filled up, somehow I only set it to 1meg, which is obviously not enough for a large mysql database.

What I need to do is move it on, so I looked online for a solution to this and I found an article which seems to make sense. In the my.conf file at /etc/mysql/my.conf I changed the tmpdir directive to /mysqltmp. I made the directory with root login, then chmod 777 that dir. I reboot and the mysql server wont start. (it was starting just previously).

The error log says..

/usr/sbin/mysqld: Can't create/write to file '/mysqltmp/ibqADloJ'

It's a permissions error, however the directory has full permissions so why is this a problem?

Upvotes: 1

Views: 1424

Answers (1)

knittl
knittl

Reputation: 265131

Probably apparmor is getting in your way. Have a look at /etc/apparmor.d/usr.sbin.mysqld and make your new temp-folder writable by the mysqld process (or configure mysqld to write its temporary data to a directory it has write permissions for)

Upvotes: 2

Related Questions