MySQLdb Module Question

Wayne Topa wtopa at
Thu Nov 11 14:07:24 EST 1999

  As a Python newbie, I am having a problem getting the
MySQLdbmodule-0.1.1 working.  I was able to use the 
MySQLmodule-0.4.1 to access my DB's but thought that I should upgrade
to the newer module.

  I can't connect to the Mysql database using
>>> import MySQLdb
>>> MySQLdb.connect('',user, passwd, Db)
Traceback (innermost last):
  File "<stdin>", line 1, in ?
	TypeError: too many arguments; expected 1, got 5

>From what I can understand from the Docs, MySQLdb.connect takes up to
9 args, so the above error really confuses me, as does this.

>>> MySQLdb.connect()
Traceback (innermost last):
File "<stdin>", line 1, in ?
File "/usr/lib/python1.5/site-packages/", line 259, in
  self.db = apply(connect, (), kwargs)

Maybe I don't have the correct Docs?

Could someone give me an example of some of the syntax of this module,


According to my calculations the problem doesn't exist.

More information about the Python-list mailing list