MySQL Connector/J 5.1 Developer Guide

5.8 Connecting Using Unix Domain Sockets

Connector/J does not natively support connections to MySQL Servers with Unix domain sockets. However, there is provision for using 3rd-party libraries that supply the function via a pluggable socket factory. Such a custom factory should implement the legacy com.mysql.jdbc.SocketFactory interface of Connector/J. Follow these requirements when you use such a custom socket factory for Unix sockets :