problem with SQLObject + mysql

Guillermo Heizenreder gheize at gmail.com
Thu Aug 30 12:33:11 CEST 2007


Hi list I'm new whit SQLObjet. 
I'm study the tutorial:Connecting databases to Python with SQLObjet[1]

My problem is:
>>>from sqlobject.mysql import builder
>>>con=builder()(user='dbuser',passwd='dbpassword',host='localhost',db='garbanzo')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File
"/usr/lib/python2.5/site-packages/SQLObject-0.9.1-py2.5.egg/sqlobject/mysql/mysqlconnection.py", line 51, in __init__
    DBAPI.__init__(self, **kw)
  File
"/usr/lib/python2.5/site-packages/SQLObject-0.9.1-py2.5.egg/sqlobject/dbconnection.py", line 249, in __init__
    DBConnection.__init__(self, **kw)
TypeError: __init__() got an unexpected keyword argument 'passwd'


First i creating the user mysql:
 guille at leinad-desktop:~$ mysql -u root
 mysql> use mysql;
 Database changed
 mysql> create database garbanzo;
 Query OK, 1 row affected (0.02 sec)
 mysql> grant all privileges on garbanzo to 'dbuser'@'localhost'
identified by 'dbpassword';
 Query OK, 0 rows affected (0.10 sec)
 mysql> flush privileges;
 Query OK, 0 rows affected (0.09 sec)


So... how i do to connect?. how create de password correctly? 

Thanks and kind regards from Argentina.
P/D: my English it to bad, I'm a novice, :P.

[1]http://www-128.ibm.com/developerworks/library/os-pythonsqlo/index.html?ca=drs#resources
-- 
Heizenreder Guillermo
http://code.google.com/u/gheize/




More information about the Python-list mailing list