MySQL Connector/Python Developer Guide

10.2.49 MySQLConnection.unix_socket Property

This read-only property returns the Unix socket file for connecting to the MySQL server.

Returns a string.