Maximize MariaDB/MySQL performance via Unix Domain Socket

For example, topics like MySQL Database remote connection might be caused by this TCP vs Socket issue.

Adding the socket to the chroot might be a solution, but I have not researched the security implications. See this related post: linux - Webserver: chrooted PHP gives mysql.sock error when attempting to reach mysql - Server Fault

And while on the topic of chroot, maybe also check Unable tos end email with jailkit enabled - #13 by hescominsoon