How can I make MySQL cross a filesystem (or maybe the question at hand is are my permissions off)?
My db is failing to restart, "init: mysql respawning too fast, stopped"
This server has run consistently for several months now, and ALL I have changed is tmpdir in my.cnf. I've found a lot of posts where a recent MySQL update is to blame, but I just changed tmpdir--that's it.
Backstory, debug info, my thought/effort so far:
We got ERROR 1114 (HY000) when indexing a table. The drive was not full, though MySQL thinks we're out of space. So I found a link where changing tmpdir fixed the issue--it made sense, so I did the same.
http://blog.jcole.us/2011/01/05/innodb-online-index-add-and-the-table-t-is-full-error/
I created a new directory in a huge volume and changed tmpdir in my.cnf. Now the db server refuses to start, "respawning too fast" (log at bottom).
I thought there might be an issue with tmpdir being defined outside of /tmp (which would render silly the idea of defining the variable, but I'm open-minded), so I created a link to the new filesystem from /tmp/mysql, which brought the same failure.
When I remove the symlink and make just a directory there, mysql starts just fine. Without touching my.cnf I can make the DB start or fail with this small change. This tells me--unless I've missed something else--that either my permissions are goofy or mysql doesn't like crossing filesystems. Since the link above presents crossing filesystems as the solution, I need a flag for that or it's a nonissue.
What do I need to fix? My db is running as 'mysql,' not as 'root.'
I hope code tags work; here are my file permissions (I've tried the perms at 777 and 755):
# ls -l /files/bak/huge/ | grep tmp
drwxr-xr-x 2 mysql mysql 4096 Apr 9 15:06 tmp
When I run 'service mysql restart' I get three groups of this in the log: they are similar, except for the 'stopped' lines show 'respawning' the first two times:
Apr 9 16:43:42 ip-10-145-150-200 kernel: [50905359.891568] init: mysql post-start process (25342) terminated with status 1
Apr 9 16:43:42 ip-10-145-150-200 kernel: [50905359.891568] init: mysql post-start process (25342) terminated with status 1
Apr 9 16:43:42 ip-10-145-150-200 kernel: [50905359.911170] type=1400 audit(1397083422.430:106): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=25379 comm="apparmor_parser"
Apr 9 16:43:42 ip-10-145-150-200 kernel: [50905359.911170] type=1400 audit(1397083422.430:106): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=25379 comm="apparmor_parser"
Apr 9 16:43:42 ip-10-145-150-200 kernel: [50905359.999124] type=1400 audit(1397083422.518:107): apparmor="DENIED" operation="mknod" parent=1 profile="/usr/sbin/mysqld" name="/files/bak/tmp/ibrdqXkB" pid=25391 comm="mysqld" requested_mask="c" denied_mask="c" fsuid=106 ouid=106
Apr 9 16:43:42 ip-10-145-150-200 kernel: [50905359.999124] type=1400 audit(1397083422.518:107): apparmor="DENIED" operation="mknod" parent=1 profile="/usr/sbin/mysqld" name="/files/bak/tmp/ibrdqXkB" pid=25391 comm="mysqld" requested_mask="c" denied_mask="c" fsuid=106 ouid=106
Apr 9 16:43:42 ip-10-145-150-200 kernel: [50905360.004655] init: mysql main process (25391) terminated with status 1
Apr 9 16:43:42 ip-10-145-150-200 kernel: [50905360.004702] init: mysql respawning too fast, stopped
Apr 9 16:43:42 ip-10-145-150-200 kernel: [50905360.004655] init: mysql main process (25391) terminated with status 1
Apr 9 16:43:42 ip-10-145-150-200 kernel: [50905360.004702] init: mysql respawning too fast, stopped
Thanks for reading. I can handle sysadmin, but I'm a DB noob. Mods feel free to move this question if needed.