I\'m having trouble with the MySQLdb module.
db = MySQLdb.connect( host = \'localhost\', user = \'root\', passwd = \'\', db = \'testdb\',
add unix_socket='path_to_socket' where path_to_socket should be the path of the MySQL socket, e.g. /var/run/mysqld/mysqld2.sock
unix_socket='path_to_socket'
path_to_socket
/var/run/mysqld/mysqld2.sock