Fix db host permission
Update tmp sub directories permission
Use location_custom_cfg_prepend and patched mysql db module

location_custom_cfg_prepend is from upstream nginx module instead of custom patched version.
In order to export resources for db configurations, mysql::db resources has to have unique names, use patched version of mysql moduel to achive this. The patch wil be submitted to upstream.