471,349 Members | 2,001 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,349 software developers and data experts.

problem with SQLObject + mysql

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@leinad-desktop:~$ mysql -u root
mysqluse mysql;
Database changed
mysqlcreate database garbanzo;
Query OK, 1 row affected (0.02 sec)
mysqlgrant all privileges on garbanzo to 'dbuser'@'localhost'
identified by 'dbpassword';
Query OK, 0 rows affected (0.10 sec)
mysqlflush 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/

Aug 30 '07 #1
0 884

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by jacob.miles | last post: by
3 posts views Thread by Oleg Broytmann | last post: by
2 posts views Thread by Oleg Broytmann | last post: by
reply views Thread by Oleg Broytmann | last post: by
reply views Thread by Oleg Broytmann | last post: by
reply views Thread by Guillermo Heizenreder | last post: by
reply views Thread by Oleg Broytmann | last post: by
reply views Thread by Oleg Broytmann | last post: by
reply views Thread by Oleg Broytmann | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.