Accessing a XAMPP mysql via Python
For the record (and thanks to a pointer from Igancio), I found that the below works (terrible I didn't think of this before):
db=MySQLdb.connect(
user="root"
,passwd=""
,db="my_db"
,unix_socket="/opt/lampp/var/mysql/mysql.sock")