I have spent hours trying to figure this out. I have mysql working great as long as I connect to it from the web root folder. When I try and connect from a directory under the root I get a can't connect to tmp/mysql.sock. I have tried including the path with hostname and that did not work. When I check for the .sock file in the tmp folder it is not there and I can't find the bugger anywhere.
I have read that this file can be destroyed/deleted but if that is the case I would think I would not be able to connect from the web root.
Linux box PHP connect script.
If this makes sense to anyone I could sure use the Help.