Thanks,

the problem was after the installation of python-mysql,

i don't know why, but when i logout of shell the connection works.

greetings!

pepe.

On Nov 11, 2:49 pm, Thadeus Burgess <[email protected]> wrote:
> YOu need to install the python mysql drivers.
>
> apt-get install python-mysql
>
> -Thadeus
>
>
>
> On Wed, Nov 11, 2009 at 4:16 AM, Pepe <[email protected]> wrote:
>
> > Hi,
>
> > I recently installed "mysql-python" in my account on "Dreamhost" and
> > changed my sqlite connection to mysql:
>
> > before: db = DAL('sqlite://storage.sqlite')
>
> > after: db = DAL('mysql://db_username:[email protected]/
> > db_name')
>
> > and now I get this error:
>
> > Traceback (most recent call last):
> >  File "gluon/restricted.py", line 184, in restricted
> >    exec ccode in environment
> >  File "/home/.debuggers/ftp_python/mydomain.cl/applications/init/
> > models/db.py <http://mydomain.cl/applications/init/%0Amodels/db.py>", line
> > 15, in <module>
> >    db = DAL('mysql://db_username:[email protected]/
> > db_name')       # if not, use SQLite or other DB
> >  File "gluon/sql.py", line 3580, in DAL
> >    return SQLDB(uri, pool_size=pool_size, folder=folder)
> >  File "gluon/sql.py", line 870, in __init__
> >    self._pool_connection(lambda : MySQLdb.Connection(
> >  File "gluon/sql.py", line 781, in _pool_connection
> >    self._connection = f()
> >  File "gluon/sql.py", line 870, in <lambda>
> >    self._pool_connection(lambda : MySQLdb.Connection(
> > NameError: global name 'MySQLdb' is not defined
>
> > Can anyone help me?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to