Installation on CentOS leave mysqld.pid and mysqld.sock in /var/lib

As many of you know @codingCoffee and @bkm and I have been working on improvements to the easy installation script (install.py). I think we are very close to having a solid installer for tons of supported platforms.

I was able to run successful tests on Debian 7, Debian 8, Ubuntu 14, Ubuntu 16 and CentOS 7.

@codingCoffee - The extra commands you placed in the Ansible scripts for MariaDB to ensure that the pid and sock files are in /var/run/mysqld are not being run for CentOS. Would you please adjust so this occurs as well? You will need a setting to create the directory (/var/run/mysqld) as it is not created by default by the installer either. With this change all the supported distributions will act and “look” the same.

Also, would you look at my PR to bring install.py up to speed with support for Debian 9 (with an update to Ansible 2.4.1)? I have tested this change on all platforms and it works great.

2 Likes

On Debian based distros, MaraiDB 10.2 creates the pid and sock files in /var/run/mysqld/, where as in case of CentOS it creates it in /var/lib/mysql/. You can verify this by installing MariaDB 10.2 on a fresh instance of both the distros using a little help from here.

And the extra commands placed in Ansible playbooks were to ensure that mysql looks for the sock and pid files in /var/run/mysqld/ in case it’s a Debian based distro. So it’s more of a MariaDB thing and not an ERPNext thing, and hence I’m not sure, if it is necessary to make additional modifications so that all supported distributions ‘look’ the same. I feel it’ll just over-complicate things but then again I might be wrong and we can have a discussion on this.

Regarding the PR with Debian 9 and ansible update. Will test it out and get it merged as soon as possible. :+1: