I installed web2py as source and wanted to use DAL without the rest of the 
framework. 

But DAL does not connect to mysql:

>>> DAL('mysql://user1:user1@localhost/test_rma')
...
RuntimeError: Failure to connect, tried 5 times:
'NoneType' object has no attribute 'connect'



Whereas MySQLdb can connect to the database with the same credentials:

>>> import MySQLdb
>>> db = MySQLdb.connect(host='localhost', user='user1', passwd='user1', db=
'test_rma')



A similar 
problem<http://stackoverflow.com/questions/7891376/web2py-wont-connect-to-mssql>with
 MsSQL was solved by explicitly setting the driver object. I tried the 
same solution:

>>> from gluon.dal import MySQLAdapter
>>> print MySQLAdapter.driver
None
>>> driver = globals().get('MySQLdb',None)
>>> print MySQLAdapter.driver
None



But still the driver is None.

Do you have any suggestion?

Reply via email to