So the problem changed from what it was, i\'ll leave the original question below to prevent bad reviews on answers like I had after someone editing his question I answered :
Can you try 127.0.0.1 as the server name instead of localhost?
127.0.0.1
localhost
IIRC, with some mySQL drivers / adapters, this decides whether the socket is used for establishing the connection or not.