On Wed, May 16, 2018 at 9:15 AM Mark Stodola <stod...@pelletron.com> wrote:
> On 05/15/2018 08:53 PM, Lofgren, Eric wrote: > > Having failed to fix the ugly partition system, we’re going for reconfiguring mysql to make it elsewhere. I followed this post to try to get the temporary directory to point to another partition: https://encylia.com/2015/02/06/how-to-change-the-mysql-tmp-location-on-centos/ by doing all of the following under sudo: > > > > mkdir /home/mysqltmp > > chmod 1777 /home/mysqltmp > > > > nano /etc/my.cnf > > > > Add below line under the [mysqld] section and save the file: > > tmpdir=/home/mysqltmp > > > > systemctl restart mysqld > > > > This restart fails. If I restore the old my.cnf without the change, it works perfectly. Checking the log, it seems there’s a permissions issue: > > > > 2018-05-16T00:01:05.211853Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.22) starting as process 5929 ... > > 2018-05-16T00:01:05.214159Z 0 [Note] InnoDB: PUNCH HOLE support available > > 2018-05-16T00:01:05.214186Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins > > 2018-05-16T00:01:05.214191Z 0 [Note] InnoDB: Uses event mutexes > > 2018-05-16T00:01:05.214194Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier > > 2018-05-16T00:01:05.214197Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3 > > 2018-05-16T00:01:05.214202Z 0 [Note] InnoDB: Using Linux native AIO > > 2018-05-16T00:01:05.214382Z 0 [Note] InnoDB: Number of pools: 1 > > 2018-05-16T00:01:05.214459Z 0 [Note] InnoDB: Using CPU crc32 instructions > > mysqld: Can't create/write to file '/home/mysqltmp/ibAcknwl' (Errcode: 13 - Permission denied) > > 2018-05-16T00:01:05.214535Z 0 [ERROR] InnoDB: Unable to create temporary file; errno: 13 > > 2018-05-16T00:01:05.214542Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error > > 2018-05-16T00:01:05.214548Z 0 [ERROR] Plugin 'InnoDB' init function returned error. > > 2018-05-16T00:01:05.214551Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. > > 2018-05-16T00:01:05.214554Z 0 [ERROR] Failed to initialize builtin plugins. > > 2018-05-16T00:01:05.214557Z 0 [ERROR] Aborting > > > > Any clues as to what I’ve done wrong? > > > > Thanks, > > Eric > > > Moving the temporary file location is a bandage. You really should be > concerned with the full root partition. It is going to affect the > operation of more than just mysql. This is *exactly* why many folks make /var/limysql a mountpoint to some bulky attached storage, to avoid having to reconfigure their MySQL. It's helpful to move aside the old directory, and make a n ew directory with permissions 000 to ensure that failure to mount the directory does not leave an almost-kind-of-running MySQL on system startup.