I\'m having trouble with the MySQLdb module.
db = MySQLdb.connect( host = \'localhost\', user = \'root\', passwd = \'\', db = \'testdb\',
Maybe try adding the keyword parameter unix_socket = None to connect()?
unix_socket = None
connect()