Create socket path variable: hardcoded mysql.sock file

I noticed the path of socket file ("/tmp/mysql.sock") is hardcoded in few binaries:

That path is different in my system: /var/run/mysqld/mysqld.sock (configured using “socket” variable in mysqld config file).

Please create a variable, so it would be possible to adjust it in the seafile config file too.