YOu need to install the python mysql drivers.

apt-get install python-mysql

-Thadeus




On Wed, Nov 11, 2009 at 4:16 AM, Pepe <pepea...@gmail.com> 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:db_passw...@mysql.mydomain.cl/
> 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:db_passw...@mysql.mydomain.cl/
> 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 web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to