I would suggest creating a ~/.my.cnf
or (if you have root access) /etc/my.cnf
file and including a client setting for the socket, libmysqlclient
might pick this up.
Failing that (or if you don't want to make a global change) the doc suggests you can specify a list of MySQL options as a separate assoc list http://clsql.b9.com/manual/connect.html which get passed into mysql_options()