Solved self-contained jail for wordpress - how to establish db connection via unix_socket?

A jail has been created for a wordpress install with apache24, mariadb114, php83 on FreeBSD 13.5 RELEASE by this jail newbie!

Since the db is dedicated to wordpress there's no need to have mariadb-server listening on externally-accessible TCP interfaces and the db connection could be made via unix_socket. However despite myriad configuration permutations I can't get Wordpress connecting to the db via the unix_socket. If I resort to a tcp/ip connection it will connect. As usual my duckduckgo-fu is proving fruitless for an answer.

As far as I can tell the crux of it is that the user from which the unix_socket connection originates becomes the db_user identity for authorising db permissions. I've assumed this is 'www'.

Is this an achievable configuration or have I been on a wild duck chase?
 
Back
Top