I realize that since UNIX sockets are platform-specific, there has to be some non-Java code involved. Specifically, we\'re interested in using JDBC to connect to a MySQL in
You could use junixsocket: https://github.com/kohlschutter/junixsocket
It already provides code for connecting to MySQL from Java (Connector/J) via Unix sockets.
One big advantage compared to other implementations is that junixsocket uses the standard Java Socket API.