For those of you who work with MySQL on CentOS or RedHat servers on a regular basis, running out of room for large MySQL databases on the root partition is pretty common. The default options in the OS installer suggest a 30GB root partition which has probably been the default value for at least ten years. Normally, this is easy to remedy. However, I was trying this on a server with MariaDB …
Trying this both via editing my.cnf and by simply a symlink produces failure:
Sep 14 16:49:06 id27131.1wpo.com mysqld: 2017-09-14 16:49:06 140313610287360 [Note] /usr/sbin/mysqld (mysqld 10.1.26-MariaDB) starting as process 22796 …
Sep 14 16:49:06 id27131.1wpo.com mysqld: 2017-09-14 16:49:06 140313610287360 [Warning] Can’t create test file /var/lib/mysql/id27131.lower-test64 ID=15680 PROTO=UDP SPT=53 DPT=60246 LEN=192 UID=25 GID=25
Looks like it may be due to a bug with mariadb!
A tutorial on DO says you need to specify the socket for the MySQL client.. i didnt even try that as mysqld fails to start!
Seems like this would have to be done by changing the variable basedir not datadir, I have yet to try that.