MySQLdb Module Question

Wayne Topa wtopa at mindspring.com
Thu Nov 11 20:07:24 CET 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/MySQLdb.py", line 259, in
__init__
  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,
please?

TIA

Wayne
-- 
According to my calculations the problem doesn't exist.
_______________________________________________________




More information about the Python-list mailing list