>> I mean put all the parameters with quotes, I guess that might be a cause >> of the error. >> >> conn = MySQLdb.connect ('host' = "localhost", 'user' = "testuser", >> 'passwd'= "testpass", 'db' = "test") > No, unfortunately the problem remains, but thanks anyway.
It's supposed to be without quotes on the keyword argument names. conn = MySQLdb.connect (host = "localhost", user = "testuser", passwd = "testpass", db = "test") It is very good that you're showing us literal error messages. There is something very funky looking in the error message you're showing us: "./mysql.py: line 3: syntax error near unexpected token `( That does NOT look like a Python error message. It looks like a shell error message from bash. Double check that you're running the script with Python. _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor